• Home
  • Raw
  • Download

Lines Matching full:bytes

151 static size_t copy_page_to_iter_iovec(struct page *page, size_t offset, size_t bytes,  in copy_page_to_iter_iovec()  argument
159 if (unlikely(bytes > i->count)) in copy_page_to_iter_iovec()
160 bytes = i->count; in copy_page_to_iter_iovec()
162 if (unlikely(!bytes)) in copy_page_to_iter_iovec()
166 wanted = bytes; in copy_page_to_iter_iovec()
170 copy = min(bytes, iov->iov_len - skip); in copy_page_to_iter_iovec()
181 bytes -= copy; in copy_page_to_iter_iovec()
183 while (unlikely(!left && bytes)) { in copy_page_to_iter_iovec()
186 copy = min(bytes, iov->iov_len); in copy_page_to_iter_iovec()
191 bytes -= copy; in copy_page_to_iter_iovec()
193 if (likely(!bytes)) { in copy_page_to_iter_iovec()
200 copy = min(bytes, iov->iov_len - skip); in copy_page_to_iter_iovec()
210 bytes -= copy; in copy_page_to_iter_iovec()
211 while (unlikely(!left && bytes)) { in copy_page_to_iter_iovec()
214 copy = min(bytes, iov->iov_len); in copy_page_to_iter_iovec()
219 bytes -= copy; in copy_page_to_iter_iovec()
228 i->count -= wanted - bytes; in copy_page_to_iter_iovec()
232 return wanted - bytes; in copy_page_to_iter_iovec()
235 static size_t copy_page_from_iter_iovec(struct page *page, size_t offset, size_t bytes, in copy_page_from_iter_iovec() argument
243 if (unlikely(bytes > i->count)) in copy_page_from_iter_iovec()
244 bytes = i->count; in copy_page_from_iter_iovec()
246 if (unlikely(!bytes)) in copy_page_from_iter_iovec()
250 wanted = bytes; in copy_page_from_iter_iovec()
254 copy = min(bytes, iov->iov_len - skip); in copy_page_from_iter_iovec()
265 bytes -= copy; in copy_page_from_iter_iovec()
267 while (unlikely(!left && bytes)) { in copy_page_from_iter_iovec()
270 copy = min(bytes, iov->iov_len); in copy_page_from_iter_iovec()
275 bytes -= copy; in copy_page_from_iter_iovec()
277 if (likely(!bytes)) { in copy_page_from_iter_iovec()
284 copy = min(bytes, iov->iov_len - skip); in copy_page_from_iter_iovec()
294 bytes -= copy; in copy_page_from_iter_iovec()
295 while (unlikely(!left && bytes)) { in copy_page_from_iter_iovec()
298 copy = min(bytes, iov->iov_len); in copy_page_from_iter_iovec()
303 bytes -= copy; in copy_page_from_iter_iovec()
312 i->count -= wanted - bytes; in copy_page_from_iter_iovec()
316 return wanted - bytes; in copy_page_from_iter_iovec()
362 static size_t copy_page_to_iter_pipe(struct page *page, size_t offset, size_t bytes, in copy_page_to_iter_pipe() argument
370 if (unlikely(bytes > i->count)) in copy_page_to_iter_pipe()
371 bytes = i->count; in copy_page_to_iter_pipe()
373 if (unlikely(!bytes)) in copy_page_to_iter_pipe()
385 buf->len += bytes; in copy_page_to_iter_pipe()
386 i->iov_offset += bytes; in copy_page_to_iter_pipe()
398 buf->len = bytes; in copy_page_to_iter_pipe()
399 i->iov_offset = offset + bytes; in copy_page_to_iter_pipe()
402 i->count -= bytes; in copy_page_to_iter_pipe()
403 return bytes; in copy_page_to_iter_pipe()
408 * bytes. For each iovec, fault in each page that constitutes the iovec.
413 int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes) in iov_iter_fault_in_readable() argument
421 iterate_iovec(i, bytes, v, iov, skip, ({ in iov_iter_fault_in_readable()
533 static size_t copy_pipe_to_iter(const void *addr, size_t bytes, in copy_pipe_to_iter() argument
543 bytes = n = push_pipe(i, bytes, &idx, &off); in copy_pipe_to_iter()
554 i->count -= bytes; in copy_pipe_to_iter()
555 return bytes; in copy_pipe_to_iter()
558 size_t _copy_to_iter(const void *addr, size_t bytes, struct iov_iter *i) in _copy_to_iter() argument
562 return copy_pipe_to_iter(addr, bytes, i); in _copy_to_iter()
565 iterate_and_advance(i, bytes, v, in _copy_to_iter()
572 return bytes; in _copy_to_iter()
599 static size_t copy_pipe_to_iter_mcsafe(const void *addr, size_t bytes, in copy_pipe_to_iter_mcsafe() argument
609 bytes = n = push_pipe(i, bytes, &idx, &off); in copy_pipe_to_iter_mcsafe()
633 * @bytes: total transfer length
656 size_t _copy_to_iter_mcsafe(const void *addr, size_t bytes, struct iov_iter *i) in _copy_to_iter_mcsafe() argument
662 return copy_pipe_to_iter_mcsafe(addr, bytes, i); in _copy_to_iter_mcsafe()
665 iterate_and_advance(i, bytes, v, in _copy_to_iter_mcsafe()
672 bytes = curr_addr - s_addr - rem; in _copy_to_iter_mcsafe()
673 return bytes; in _copy_to_iter_mcsafe()
681 bytes = curr_addr - s_addr - rem; in _copy_to_iter_mcsafe()
682 return bytes; in _copy_to_iter_mcsafe()
687 return bytes; in _copy_to_iter_mcsafe()
692 size_t _copy_from_iter(void *addr, size_t bytes, struct iov_iter *i) in _copy_from_iter() argument
701 iterate_and_advance(i, bytes, v, in _copy_from_iter()
708 return bytes; in _copy_from_iter()
712 bool _copy_from_iter_full(void *addr, size_t bytes, struct iov_iter *i) in _copy_from_iter_full() argument
719 if (unlikely(i->count < bytes)) in _copy_from_iter_full()
724 iterate_all_kinds(i, bytes, v, ({ in _copy_from_iter_full()
734 iov_iter_advance(i, bytes); in _copy_from_iter_full()
739 size_t _copy_from_iter_nocache(void *addr, size_t bytes, struct iov_iter *i) in _copy_from_iter_nocache() argument
746 iterate_and_advance(i, bytes, v, in _copy_from_iter_nocache()
754 return bytes; in _copy_from_iter_nocache()
762 * @bytes: total transfer length
773 size_t _copy_from_iter_flushcache(void *addr, size_t bytes, struct iov_iter *i) in _copy_from_iter_flushcache() argument
780 iterate_and_advance(i, bytes, v, in _copy_from_iter_flushcache()
789 return bytes; in _copy_from_iter_flushcache()
794 bool _copy_from_iter_full_nocache(void *addr, size_t bytes, struct iov_iter *i) in _copy_from_iter_full_nocache() argument
801 if (unlikely(i->count < bytes)) in _copy_from_iter_full_nocache()
803 iterate_all_kinds(i, bytes, v, ({ in _copy_from_iter_full_nocache()
813 iov_iter_advance(i, bytes); in _copy_from_iter_full_nocache()
842 size_t copy_page_to_iter(struct page *page, size_t offset, size_t bytes, in copy_page_to_iter() argument
845 if (unlikely(!page_copy_sane(page, offset, bytes))) in copy_page_to_iter()
849 size_t wanted = copy_to_iter(kaddr + offset, bytes, i); in copy_page_to_iter()
853 return copy_page_to_iter_iovec(page, offset, bytes, i); in copy_page_to_iter()
855 return copy_page_to_iter_pipe(page, offset, bytes, i); in copy_page_to_iter()
859 size_t copy_page_from_iter(struct page *page, size_t offset, size_t bytes, in copy_page_from_iter() argument
862 if (unlikely(!page_copy_sane(page, offset, bytes))) in copy_page_from_iter()
870 size_t wanted = _copy_from_iter(kaddr + offset, bytes, i); in copy_page_from_iter()
874 return copy_page_from_iter_iovec(page, offset, bytes, i); in copy_page_from_iter()
878 static size_t pipe_zero(size_t bytes, struct iov_iter *i) in pipe_zero() argument
887 bytes = n = push_pipe(i, bytes, &idx, &off); in pipe_zero()
898 i->count -= bytes; in pipe_zero()
899 return bytes; in pipe_zero()
902 size_t iov_iter_zero(size_t bytes, struct iov_iter *i) in iov_iter_zero() argument
905 return pipe_zero(bytes, i); in iov_iter_zero()
906 iterate_and_advance(i, bytes, v, in iov_iter_zero()
912 return bytes; in iov_iter_zero()
917 struct iov_iter *i, unsigned long offset, size_t bytes) in iov_iter_copy_from_user_atomic() argument
920 if (unlikely(!page_copy_sane(page, offset, bytes))) { in iov_iter_copy_from_user_atomic()
929 iterate_all_kinds(i, bytes, v, in iov_iter_copy_from_user_atomic()
936 return bytes; in iov_iter_copy_from_user_atomic()
1322 size_t csum_and_copy_from_iter(void *addr, size_t bytes, __wsum *csum, in csum_and_copy_from_iter() argument
1333 iterate_and_advance(i, bytes, v, ({ in csum_and_copy_from_iter()
1360 return bytes; in csum_and_copy_from_iter()
1364 bool csum_and_copy_from_iter_full(void *addr, size_t bytes, __wsum *csum, in csum_and_copy_from_iter_full() argument
1375 if (unlikely(i->count < bytes)) in csum_and_copy_from_iter_full()
1377 iterate_all_kinds(i, bytes, v, ({ in csum_and_copy_from_iter_full()
1404 iov_iter_advance(i, bytes); in csum_and_copy_from_iter_full()
1409 size_t csum_and_copy_to_iter(const void *addr, size_t bytes, __wsum *csum, in csum_and_copy_to_iter() argument
1420 iterate_and_advance(i, bytes, v, ({ in csum_and_copy_to_iter()
1447 return bytes; in csum_and_copy_to_iter()
1593 int iov_iter_for_each_range(struct iov_iter *i, size_t bytes, in iov_iter_for_each_range() argument
1599 if (!bytes) in iov_iter_for_each_range()
1602 iterate_all_kinds(i, bytes, v, -EINVAL, ({ in iov_iter_for_each_range()