Home
last modified time | relevance | path

Searched refs:iter (Results 1 – 25 of 99) sorted by relevance

1234

/fs/iomap/
Diter.c10 static inline int iomap_iter_advance(struct iomap_iter *iter) in iomap_iter_advance() argument
13 if (iter->iomap.length) { in iomap_iter_advance()
14 if (iter->processed <= 0) in iomap_iter_advance()
15 return iter->processed; in iomap_iter_advance()
16 if (WARN_ON_ONCE(iter->processed > iomap_length(iter))) in iomap_iter_advance()
18 iter->pos += iter->processed; in iomap_iter_advance()
19 iter->len -= iter->processed; in iomap_iter_advance()
20 if (!iter->len) in iomap_iter_advance()
25 iter->processed = 0; in iomap_iter_advance()
26 memset(&iter->iomap, 0, sizeof(iter->iomap)); in iomap_iter_advance()
[all …]
Dseek.c13 static loff_t iomap_seek_hole_iter(const struct iomap_iter *iter, in iomap_seek_hole_iter() argument
16 loff_t length = iomap_length(iter); in iomap_seek_hole_iter()
18 switch (iter->iomap.type) { in iomap_seek_hole_iter()
20 *hole_pos = mapping_seek_hole_data(iter->inode->i_mapping, in iomap_seek_hole_iter()
21 iter->pos, iter->pos + length, SEEK_HOLE); in iomap_seek_hole_iter()
22 if (*hole_pos == iter->pos + length) in iomap_seek_hole_iter()
26 *hole_pos = iter->pos; in iomap_seek_hole_iter()
37 struct iomap_iter iter = { in iomap_seek_hole() local
48 iter.len = size - pos; in iomap_seek_hole()
49 while ((ret = iomap_iter(&iter, ops)) > 0) in iomap_seek_hole()
[all …]
Dbuffered-io.c208 static loff_t iomap_read_inline_data(const struct iomap_iter *iter, in iomap_read_inline_data() argument
211 const struct iomap *iomap = iomap_iter_srcmap(iter); in iomap_read_inline_data()
212 size_t size = i_size_read(iter->inode) - iomap->offset; in iomap_read_inline_data()
227 iomap_page_create(iter->inode, page); in iomap_read_inline_data()
237 static inline bool iomap_block_needs_zeroing(const struct iomap_iter *iter, in iomap_block_needs_zeroing() argument
240 const struct iomap *srcmap = iomap_iter_srcmap(iter); in iomap_block_needs_zeroing()
244 pos >= i_size_read(iter->inode); in iomap_block_needs_zeroing()
247 static loff_t iomap_readpage_iter(const struct iomap_iter *iter, in iomap_readpage_iter() argument
250 const struct iomap *iomap = &iter->iomap; in iomap_readpage_iter()
251 loff_t pos = iter->pos + offset; in iomap_readpage_iter()
[all …]
Ddirect-io.c41 struct iov_iter *iter; member
64 static void iomap_dio_submit_bio(const struct iomap_iter *iter, in iomap_dio_submit_bio() argument
72 dio->submit.last_queue = bdev_get_queue(iter->iomap.bdev); in iomap_dio_submit_bio()
74 dio->submit.cookie = dio->dops->submit_io(iter, bio, pos); in iomap_dio_submit_bio()
187 static void iomap_dio_zero(const struct iomap_iter *iter, struct iomap_dio *dio, in iomap_dio_zero() argument
198 bio_set_dev(bio, iter->iomap.bdev); in iomap_dio_zero()
199 bio->bi_iter.bi_sector = iomap_sector(&iter->iomap, pos); in iomap_dio_zero()
206 iomap_dio_submit_bio(iter, dio, bio, pos); in iomap_dio_zero()
237 static loff_t iomap_dio_bio_iter(const struct iomap_iter *iter, in iomap_dio_bio_iter() argument
240 const struct iomap *iomap = &iter->iomap; in iomap_dio_bio_iter()
[all …]
Dfiemap.c41 static loff_t iomap_fiemap_iter(const struct iomap_iter *iter, in iomap_fiemap_iter() argument
46 if (iter->iomap.type == IOMAP_HOLE) in iomap_fiemap_iter()
47 return iomap_length(iter); in iomap_fiemap_iter()
50 *prev = iter->iomap; in iomap_fiemap_iter()
53 return iomap_length(iter); in iomap_fiemap_iter()
64 struct iomap_iter iter = { in iomap_fiemap() local
75 ret = fiemap_prep(inode, fi, start, &iter.len, 0); in iomap_fiemap()
79 while ((ret = iomap_iter(&iter, ops)) > 0) in iomap_fiemap()
80 iter.processed = iomap_fiemap_iter(&iter, fi, &prev); in iomap_fiemap()
100 struct iomap_iter iter = { in iomap_bmap() local
[all …]
Dswapfile.c97 static loff_t iomap_swapfile_iter(const struct iomap_iter *iter, in iomap_swapfile_iter() argument
135 return iomap_length(iter); in iomap_swapfile_iter()
147 struct iomap_iter iter = { in iomap_swapfile_activate() local
168 while ((ret = iomap_iter(&iter, ops)) > 0) in iomap_swapfile_activate()
169 iter.processed = iomap_swapfile_iter(&iter, &iter.iomap, &isi); in iomap_swapfile_activate()
Dtrace.h153 TP_PROTO(struct iomap_iter *iter, const void *ops,
155 TP_ARGS(iter, ops, caller),
166 __entry->dev = iter->inode->i_sb->s_dev;
167 __entry->ino = iter->inode->i_ino;
168 __entry->pos = iter->pos;
169 __entry->length = iomap_length(iter);
170 __entry->flags = iter->flags;
/fs/btrfs/
Dbackref.h100 static inline void btrfs_backref_iter_free(struct btrfs_backref_iter *iter) in btrfs_backref_iter_free() argument
102 if (!iter) in btrfs_backref_iter_free()
104 btrfs_free_path(iter->path); in btrfs_backref_iter_free()
105 kfree(iter); in btrfs_backref_iter_free()
109 struct btrfs_backref_iter *iter) in btrfs_backref_get_eb() argument
111 if (!iter) in btrfs_backref_get_eb()
113 return iter->path->nodes[0]; in btrfs_backref_get_eb()
123 struct btrfs_backref_iter *iter) in btrfs_backref_has_tree_block_info() argument
125 if (iter->cur_key.type == BTRFS_EXTENT_ITEM_KEY && in btrfs_backref_has_tree_block_info()
126 iter->cur_ptr - iter->item_ptr == sizeof(struct btrfs_extent_item)) in btrfs_backref_has_tree_block_info()
[all …]
Dbackref.c2396 int btrfs_backref_iter_start(struct btrfs_backref_iter *iter, u64 bytenr) argument
2398 struct btrfs_fs_info *fs_info = iter->fs_info;
2399 struct btrfs_path *path = iter->path;
2407 iter->bytenr = bytenr;
2429 memcpy(&iter->cur_key, &key, sizeof(key));
2430 iter->item_ptr = (u32)btrfs_item_ptr_offset(path->nodes[0],
2432 iter->end_ptr = (u32)(iter->item_ptr +
2448 iter->cur_ptr = (u32)(iter->item_ptr + sizeof(*ei));
2451 if (iter->cur_ptr >= iter->end_ptr) {
2462 btrfs_item_key_to_cpu(path->nodes[0], &iter->cur_key,
[all …]
/fs/
Ddax.c1168 struct iov_iter *iter) in dax_iomap_iter() argument
1180 if (iov_iter_rw(iter) == READ) { in dax_iomap_iter()
1186 return iov_iter_zero(min(length, end - pos), iter); in dax_iomap_iter()
1239 if (iov_iter_rw(iter) == WRITE) in dax_iomap_iter()
1241 map_len, iter); in dax_iomap_iter()
1244 map_len, iter); in dax_iomap_iter()
1271 dax_iomap_rw(struct kiocb *iocb, struct iov_iter *iter, in dax_iomap_rw() argument
1277 .len = iov_iter_count(iter), in dax_iomap_rw()
1285 if (iov_iter_rw(iter) == WRITE) { in dax_iomap_rw()
1296 iomi.processed = dax_iomap_iter(&iomi, iter); in dax_iomap_rw()
[all …]
Dread_write.c397 struct iov_iter iter; in new_sync_read() local
402 iov_iter_init(&iter, READ, &iov, 1, len); in new_sync_read()
404 ret = call_read_iter(filp, &kiocb, &iter); in new_sync_read()
426 struct iov_iter iter; in __kernel_read() local
442 iov_iter_kvec(&iter, READ, &iov, 1, iov.iov_len); in __kernel_read()
443 ret = file->f_op->read_iter(&kiocb, &iter); in __kernel_read()
500 struct iov_iter iter; in new_sync_write() local
505 iov_iter_init(&iter, WRITE, &iov, 1, len); in new_sync_write()
507 ret = call_write_iter(filp, &kiocb, &iter); in new_sync_write()
522 struct iov_iter iter; in __kernel_write() local
[all …]
Ddirect-io.c107 struct iov_iter *iter; member
173 ret = iov_iter_get_pages(sdio->iter, dio->pages, LONG_MAX, DIO_PAGES, in dio_refill_pages()
195 iov_iter_advance(sdio->iter, ret); in dio_refill_pages()
1130 struct block_device *bdev, struct iov_iter *iter, in do_blockdev_direct_IO() argument
1138 const size_t count = iov_iter_count(iter); in do_blockdev_direct_IO()
1145 unsigned long align = offset | iov_iter_alignment(iter); in do_blockdev_direct_IO()
1153 if (iov_iter_rw(iter) == READ && !count) in do_blockdev_direct_IO()
1167 if (dio->flags & DIO_LOCKING && iov_iter_rw(iter) == READ) { in do_blockdev_direct_IO()
1174 if (iov_iter_rw(iter) == READ && offset >= dio->i_size) { in do_blockdev_direct_IO()
1187 if (dio->flags & DIO_LOCKING && iov_iter_rw(iter) == READ) { in do_blockdev_direct_IO()
[all …]
/fs/nfs/
Ddirect.c164 ssize_t nfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter) in nfs_direct_IO() argument
172 VM_BUG_ON(iov_iter_count(iter) != PAGE_SIZE); in nfs_direct_IO()
174 if (iov_iter_rw(iter) == READ) in nfs_direct_IO()
175 return nfs_file_direct_read(iocb, iter, true); in nfs_direct_IO()
176 return nfs_file_direct_write(iocb, iter, true); in nfs_direct_IO()
348 struct iov_iter *iter, in nfs_direct_read_schedule_iovec() argument
363 while (iov_iter_count(iter)) { in nfs_direct_read_schedule_iovec()
369 result = iov_iter_get_pages_alloc(iter, &pagevec, in nfs_direct_read_schedule_iovec()
375 iov_iter_advance(iter, bytes); in nfs_direct_read_schedule_iovec()
443 ssize_t nfs_file_direct_read(struct kiocb *iocb, struct iov_iter *iter, in nfs_file_direct_read() argument
[all …]
/fs/dlm/
Dplock.c433 struct plock_op *op = NULL, *iter; in dev_write() local
454 list_for_each_entry(iter, &recv_list, list) { in dev_write()
455 if (iter->info.fsid == info.fsid && in dev_write()
456 iter->info.number == info.number && in dev_write()
457 iter->info.owner == info.owner && in dev_write()
458 iter->info.pid == info.pid && in dev_write()
459 iter->info.start == info.start && in dev_write()
460 iter->info.end == info.end && in dev_write()
461 iter->info.ex == info.ex && in dev_write()
462 iter->info.wait) { in dev_write()
[all …]
Drecover.c735 struct dlm_lkb *big_lkb = NULL, *iter, *high_lkb = NULL; in recover_lvb() local
753 list_for_each_entry(iter, &r->res_grantqueue, lkb_statequeue) { in recover_lvb()
754 if (!(iter->lkb_exflags & DLM_LKF_VALBLK)) in recover_lvb()
759 if (iter->lkb_grmode > DLM_LOCK_CR) { in recover_lvb()
760 big_lkb = iter; in recover_lvb()
764 if (((int)iter->lkb_lvbseq - (int)high_seq) >= 0) { in recover_lvb()
765 high_lkb = iter; in recover_lvb()
766 high_seq = iter->lkb_lvbseq; in recover_lvb()
770 list_for_each_entry(iter, &r->res_convertqueue, lkb_statequeue) { in recover_lvb()
771 if (!(iter->lkb_exflags & DLM_LKF_VALBLK)) in recover_lvb()
[all …]
/fs/fuse/
Dpassthrough.c75 struct iov_iter *iter) in fuse_passthrough_read_iter() argument
83 if (!iov_iter_count(iter)) in fuse_passthrough_read_iter()
88 ret = vfs_iter_read(passthrough_filp, iter, &iocb_fuse->ki_pos, in fuse_passthrough_read_iter()
103 ret = call_read_iter(passthrough_filp, &aio_req->iocb, iter); in fuse_passthrough_read_iter()
116 struct iov_iter *iter) in fuse_passthrough_write_iter() argument
126 if (!iov_iter_count(iter)) in fuse_passthrough_write_iter()
136 ret = vfs_iter_write(passthrough_filp, iter, &iocb_fuse->ki_pos, in fuse_passthrough_write_iter()
157 ret = call_write_iter(passthrough_filp, &aio_req->iocb, iter); in fuse_passthrough_write_iter()
/fs/orangefs/
Dinode.c24 struct iov_iter iter; in orangefs_writepage_locked() local
56 iov_iter_bvec(&iter, WRITE, &bv, 1, wlen); in orangefs_writepage_locked()
58 ret = wait_for_direct_io(ORANGEFS_IO_WRITE, inode, &off, &iter, wlen, in orangefs_writepage_locked()
95 struct iov_iter iter; in orangefs_writepages_work() local
115 iov_iter_bvec(&iter, WRITE, ow->bv, ow->npages, ow->len); in orangefs_writepages_work()
124 ret = wait_for_direct_io(ORANGEFS_IO_WRITE, inode, &off, &iter, ow->len, in orangefs_writepages_work()
251 struct iov_iter iter; in orangefs_readahead() local
273 iov_iter_xarray(&iter, READ, i_pages, offset, readahead_length(rac)); in orangefs_readahead()
277 &offset, &iter, readahead_length(rac), in orangefs_readahead()
294 struct iov_iter iter; in orangefs_readpage() local
[all …]
Dfile.c49 loff_t *offset, struct iov_iter *iter, size_t total_size, in wait_for_direct_io() argument
139 ret = orangefs_bufmap_copy_from_iovec(iter, buffer_index, in wait_for_direct_io()
173 iov_iter_revert(iter, total_size); in wait_for_direct_io()
253 ret = orangefs_bufmap_copy_to_iovec(iter, buffer_index, in wait_for_direct_io()
324 struct iov_iter *iter) in orangefs_file_read_iter() argument
334 ret = generic_file_read_iter(iocb, iter); in orangefs_file_read_iter()
341 struct iov_iter *iter) in orangefs_file_write_iter() argument
352 ret = generic_file_write_iter(iocb, iter); in orangefs_file_write_iter()
Dorangefs-bufmap.h29 int orangefs_bufmap_copy_from_iovec(struct iov_iter *iter,
33 int orangefs_bufmap_copy_to_iovec(struct iov_iter *iter,
/fs/cachefiles/
Dio.c60 struct iov_iter *iter, in cachefiles_read() argument
69 size_t len = iov_iter_count(iter), skipped = 0; in cachefiles_read()
93 iov_iter_zero(len, iter); in cachefiles_read()
100 iov_iter_zero(skipped, iter); in cachefiles_read()
125 ret = vfs_iocb_iter_read(file, &ki->iocb, iter); in cachefiles_read()
184 struct iov_iter *iter, in cachefiles_write() argument
193 size_t len = iov_iter_count(iter); in cachefiles_write()
230 ret = vfs_iocb_iter_write(file, &ki->iocb, iter); in cachefiles_write()
/fs/ocfs2/dlm/
Ddlmmaster.c711 struct dlm_node_iter iter; in dlm_get_lock_resource() local
934 dlm_node_iter_init(mle->vote_map, &iter); in dlm_get_lock_resource()
935 while ((nodenum = dlm_node_iter_next(&iter)) >= 0) { in dlm_get_lock_resource()
1162 static void dlm_bitmap_diff_iter_init(struct dlm_bitmap_diff_iter *iter, in dlm_bitmap_diff_iter_init() argument
1169 iter->curnode = -1; in dlm_bitmap_diff_iter_init()
1170 iter->orig_bm = orig_bm; in dlm_bitmap_diff_iter_init()
1171 iter->cur_bm = cur_bm; in dlm_bitmap_diff_iter_init()
1174 p1 = *(iter->orig_bm + i); in dlm_bitmap_diff_iter_init()
1175 p2 = *(iter->cur_bm + i); in dlm_bitmap_diff_iter_init()
1176 iter->diff_bm[i] = (p1 & ~p2) | (p2 & ~p1); in dlm_bitmap_diff_iter_init()
[all …]
/fs/kernfs/
Dfile.c184 static ssize_t kernfs_file_read_iter(struct kiocb *iocb, struct iov_iter *iter) in kernfs_file_read_iter() argument
187 ssize_t len = min_t(size_t, iov_iter_count(iter), PAGE_SIZE); in kernfs_file_read_iter()
223 if (copy_to_iter(buf, len, iter) != len) { in kernfs_file_read_iter()
238 static ssize_t kernfs_fop_read_iter(struct kiocb *iocb, struct iov_iter *iter) in kernfs_fop_read_iter() argument
241 return seq_read_iter(iocb, iter); in kernfs_fop_read_iter()
242 return kernfs_file_read_iter(iocb, iter); in kernfs_fop_read_iter()
255 static ssize_t kernfs_fop_write_iter(struct kiocb *iocb, struct iov_iter *iter) in kernfs_fop_write_iter() argument
258 ssize_t len = iov_iter_count(iter); in kernfs_fop_write_iter()
277 if (copy_from_iter(buf, len, iter) != len) { in kernfs_fop_write_iter()
/fs/9p/
Dvfs_addr.c239 v9fs_direct_IO(struct kiocb *iocb, struct iov_iter *iter) in v9fs_direct_IO() argument
246 if (iov_iter_rw(iter) == WRITE) { in v9fs_direct_IO()
247 n = p9_client_write(file->private_data, pos, iter, &err); in v9fs_direct_IO()
256 n = p9_client_read(file->private_data, pos, iter, &err); in v9fs_direct_IO()
/fs/overlayfs/
Dfile.c279 static ssize_t ovl_read_iter(struct kiocb *iocb, struct iov_iter *iter) in ovl_read_iter() argument
286 if (!iov_iter_count(iter)) in ovl_read_iter()
301 ret = vfs_iter_read(real.file, iter, &iocb->ki_pos, in ovl_read_iter()
317 ret = vfs_iocb_iter_read(real.file, &aio_req->iocb, iter); in ovl_read_iter()
331 static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter) in ovl_write_iter() argument
340 if (!iov_iter_count(iter)) in ovl_write_iter()
366 ret = vfs_iter_write(real.file, iter, &iocb->ki_pos, in ovl_write_iter()
389 ret = vfs_iocb_iter_write(real.file, &aio_req->iocb, iter); in ovl_write_iter()
/fs/cifs/
Dmisc.c995 setup_aio_ctx_iter(struct cifs_aio_ctx *ctx, struct iov_iter *iter, int rw) in setup_aio_ctx_iter() argument
1002 size_t count = iov_iter_count(iter); in setup_aio_ctx_iter()
1005 unsigned int max_pages = iov_iter_npages(iter, INT_MAX); in setup_aio_ctx_iter()
1009 if (iov_iter_is_kvec(iter)) { in setup_aio_ctx_iter()
1010 memcpy(&ctx->iter, iter, sizeof(*iter)); in setup_aio_ctx_iter()
1012 iov_iter_advance(iter, count); in setup_aio_ctx_iter()
1039 rc = iov_iter_get_pages(iter, pages, count, max_pages, &start); in setup_aio_ctx_iter()
1051 iov_iter_advance(iter, rc); in setup_aio_ctx_iter()
1078 iov_iter_bvec(&ctx->iter, rw, ctx->bv, npages, ctx->len); in setup_aio_ctx_iter()

1234