Lines Matching refs:length
78 total += sg->length; in sg_nents_for_len()
486 struct scatterlist *sgl_alloc_order(unsigned long long length, in sgl_alloc_order() argument
495 nent = round_up(length, PAGE_SIZE << order) >> (PAGE_SHIFT + order); in sgl_alloc_order()
497 if (length > (nent << (PAGE_SHIFT + order))) in sgl_alloc_order()
513 while (length) { in sgl_alloc_order()
514 elem_len = min_t(u64, length, PAGE_SIZE << order); in sgl_alloc_order()
522 length -= elem_len; in sgl_alloc_order()
525 WARN_ONCE(length, "length = %lld\n", length); in sgl_alloc_order()
540 struct scatterlist *sgl_alloc(unsigned long long length, gfp_t gfp, in sgl_alloc() argument
543 return sgl_alloc_order(length, 0, false, gfp, nent_p); in sgl_alloc()
614 return PAGE_ALIGN(sg->offset + sg->length) >> PAGE_SHIFT; in sg_page_count()
698 miter->__remaining = sg->offset + sg->length - in sg_miter_get_next_page()
775 miter->consumed = miter->length = miter->__remaining; in sg_miter_next()
802 WARN_ON(miter->consumed > miter->length); in sg_miter_stop()
821 miter->length = 0; in sg_miter_stop()
860 len = min(miter.length, buflen - offset); in sg_copy_buffer()
970 len = min(miter.length, buflen - offset); in sg_zero_buffer()