Lines Matching refs:iter

24 size_t iterate_ubuf(struct iov_iter *iter, size_t len, void *priv, void *priv2,  in iterate_ubuf()  argument
27 void __user *base = iter->ubuf; in iterate_ubuf()
30 remain = step(base + iter->iov_offset, 0, len, priv, priv2); in iterate_ubuf()
32 iter->iov_offset += progress; in iterate_ubuf()
33 iter->count -= progress; in iterate_ubuf()
41 size_t iterate_iovec(struct iov_iter *iter, size_t len, void *priv, void *priv2, in iterate_iovec() argument
44 const struct iovec *p = iter->__iov; in iterate_iovec()
45 size_t progress = 0, skip = iter->iov_offset; in iterate_iovec()
64 iter->nr_segs -= p - iter->__iov; in iterate_iovec()
65 iter->__iov = p; in iterate_iovec()
66 iter->iov_offset = skip; in iterate_iovec()
67 iter->count -= progress; in iterate_iovec()
75 size_t iterate_kvec(struct iov_iter *iter, size_t len, void *priv, void *priv2, in iterate_kvec() argument
78 const struct kvec *p = iter->kvec; in iterate_kvec()
79 size_t progress = 0, skip = iter->iov_offset; in iterate_kvec()
98 iter->nr_segs -= p - iter->kvec; in iterate_kvec()
99 iter->kvec = p; in iterate_kvec()
100 iter->iov_offset = skip; in iterate_kvec()
101 iter->count -= progress; in iterate_kvec()
109 size_t iterate_bvec(struct iov_iter *iter, size_t len, void *priv, void *priv2, in iterate_bvec() argument
112 const struct bio_vec *p = iter->bvec; in iterate_bvec()
113 size_t progress = 0, skip = iter->iov_offset; in iterate_bvec()
137 iter->nr_segs -= p - iter->bvec; in iterate_bvec()
138 iter->bvec = p; in iterate_bvec()
139 iter->iov_offset = skip; in iterate_bvec()
140 iter->count -= progress; in iterate_bvec()
148 size_t iterate_folioq(struct iov_iter *iter, size_t len, void *priv, void *priv2, in iterate_folioq() argument
151 const struct folio_queue *folioq = iter->folioq; in iterate_folioq()
152 unsigned int slot = iter->folioq_slot; in iterate_folioq()
153 size_t progress = 0, skip = iter->iov_offset; in iterate_folioq()
191 iter->folioq_slot = slot; in iterate_folioq()
192 iter->folioq = folioq; in iterate_folioq()
193 iter->iov_offset = skip; in iterate_folioq()
194 iter->count -= progress; in iterate_folioq()
202 size_t iterate_xarray(struct iov_iter *iter, size_t len, void *priv, void *priv2, in iterate_xarray() argument
207 loff_t start = iter->xarray_start + iter->iov_offset; in iterate_xarray()
209 XA_STATE(xas, iter->xarray, index); in iterate_xarray()
246 iter->iov_offset += progress; in iterate_xarray()
247 iter->count -= progress; in iterate_xarray()
255 size_t iterate_discard(struct iov_iter *iter, size_t len, void *priv, void *priv2, in iterate_discard() argument
260 iter->count -= progress; in iterate_discard()
291 size_t iterate_and_advance2(struct iov_iter *iter, size_t len, void *priv, in iterate_and_advance2() argument
294 if (unlikely(iter->count < len)) in iterate_and_advance2()
295 len = iter->count; in iterate_and_advance2()
299 if (likely(iter_is_ubuf(iter))) in iterate_and_advance2()
300 return iterate_ubuf(iter, len, priv, priv2, ustep); in iterate_and_advance2()
301 if (likely(iter_is_iovec(iter))) in iterate_and_advance2()
302 return iterate_iovec(iter, len, priv, priv2, ustep); in iterate_and_advance2()
303 if (iov_iter_is_bvec(iter)) in iterate_and_advance2()
304 return iterate_bvec(iter, len, priv, priv2, step); in iterate_and_advance2()
305 if (iov_iter_is_kvec(iter)) in iterate_and_advance2()
306 return iterate_kvec(iter, len, priv, priv2, step); in iterate_and_advance2()
307 if (iov_iter_is_folioq(iter)) in iterate_and_advance2()
308 return iterate_folioq(iter, len, priv, priv2, step); in iterate_and_advance2()
309 if (iov_iter_is_xarray(iter)) in iterate_and_advance2()
310 return iterate_xarray(iter, len, priv, priv2, step); in iterate_and_advance2()
311 return iterate_discard(iter, len, priv, priv2, step); in iterate_and_advance2()
325 size_t iterate_and_advance(struct iov_iter *iter, size_t len, void *priv, in iterate_and_advance() argument
328 return iterate_and_advance2(iter, len, priv, NULL, ustep, step); in iterate_and_advance()
360 size_t iterate_and_advance_kernel(struct iov_iter *iter, size_t len, void *priv, in iterate_and_advance_kernel() argument
363 if (unlikely(iter->count < len)) in iterate_and_advance_kernel()
364 len = iter->count; in iterate_and_advance_kernel()
367 if (iov_iter_is_bvec(iter)) in iterate_and_advance_kernel()
368 return iterate_bvec(iter, len, priv, priv2, step); in iterate_and_advance_kernel()
369 if (iov_iter_is_kvec(iter)) in iterate_and_advance_kernel()
370 return iterate_kvec(iter, len, priv, priv2, step); in iterate_and_advance_kernel()
371 if (iov_iter_is_folioq(iter)) in iterate_and_advance_kernel()
372 return iterate_folioq(iter, len, priv, priv2, step); in iterate_and_advance_kernel()
373 if (iov_iter_is_xarray(iter)) in iterate_and_advance_kernel()
374 return iterate_xarray(iter, len, priv, priv2, step); in iterate_and_advance_kernel()
375 return iterate_discard(iter, len, priv, priv2, step); in iterate_and_advance_kernel()