Home
last modified time | relevance | path

Searched refs:iocb (Results 1 – 25 of 133) sorted by relevance

123456

/kernel/linux/linux-5.10/fs/ext4/
Dfile.c52 static ssize_t ext4_dio_read_iter(struct kiocb *iocb, struct iov_iter *to) in ext4_dio_read_iter() argument
55 struct inode *inode = file_inode(iocb->ki_filp); in ext4_dio_read_iter()
57 if (iocb->ki_flags & IOCB_NOWAIT) { in ext4_dio_read_iter()
73 iocb->ki_flags &= ~IOCB_DIRECT; in ext4_dio_read_iter()
74 return generic_file_read_iter(iocb, to); in ext4_dio_read_iter()
77 ret = iomap_dio_rw(iocb, to, &ext4_iomap_ops, NULL, in ext4_dio_read_iter()
78 is_sync_kiocb(iocb)); in ext4_dio_read_iter()
81 file_accessed(iocb->ki_filp); in ext4_dio_read_iter()
86 static ssize_t ext4_dax_read_iter(struct kiocb *iocb, struct iov_iter *to) in ext4_dax_read_iter() argument
88 struct inode *inode = file_inode(iocb->ki_filp); in ext4_dax_read_iter()
[all …]
/kernel/linux/linux-5.10/fs/ext2/
Dfile.c33 static ssize_t ext2_dax_read_iter(struct kiocb *iocb, struct iov_iter *to) in ext2_dax_read_iter() argument
35 struct inode *inode = iocb->ki_filp->f_mapping->host; in ext2_dax_read_iter()
42 ret = dax_iomap_rw(iocb, to, &ext2_iomap_ops); in ext2_dax_read_iter()
45 file_accessed(iocb->ki_filp); in ext2_dax_read_iter()
49 static ssize_t ext2_dax_write_iter(struct kiocb *iocb, struct iov_iter *from) in ext2_dax_write_iter() argument
51 struct file *file = iocb->ki_filp; in ext2_dax_write_iter()
56 ret = generic_write_checks(iocb, from); in ext2_dax_write_iter()
66 ret = dax_iomap_rw(iocb, from, &ext2_iomap_ops); in ext2_dax_write_iter()
67 if (ret > 0 && iocb->ki_pos > i_size_read(inode)) { in ext2_dax_write_iter()
68 i_size_write(inode, iocb->ki_pos); in ext2_dax_write_iter()
[all …]
/kernel/linux/linux-5.10/fs/
Daio.c566 void kiocb_set_cancel_fn(struct kiocb *iocb, kiocb_cancel_fn *cancel) in kiocb_set_cancel_fn() argument
568 struct aio_kiocb *req = container_of(iocb, struct aio_kiocb, rw); in kiocb_set_cancel_fn()
1080 static inline void iocb_destroy(struct aio_kiocb *iocb) in iocb_destroy() argument
1082 if (iocb->ki_eventfd) in iocb_destroy()
1083 eventfd_ctx_put(iocb->ki_eventfd); in iocb_destroy()
1084 if (iocb->ki_filp) in iocb_destroy()
1085 fput(iocb->ki_filp); in iocb_destroy()
1086 percpu_ref_put(&iocb->ki_ctx->reqs); in iocb_destroy()
1087 kmem_cache_free(kiocb_cachep, iocb); in iocb_destroy()
1093 static void aio_complete(struct aio_kiocb *iocb) in aio_complete() argument
[all …]
Dblock_dev.c216 static unsigned int dio_bio_write_op(struct kiocb *iocb) in dio_bio_write_op() argument
221 if (iocb->ki_flags & IOCB_DSYNC) in dio_bio_write_op()
237 __blkdev_direct_IO_simple(struct kiocb *iocb, struct iov_iter *iter, in __blkdev_direct_IO_simple() argument
240 struct file *file = iocb->ki_filp; in __blkdev_direct_IO_simple()
243 loff_t pos = iocb->ki_pos; in __blkdev_direct_IO_simple()
265 bio.bi_write_hint = iocb->ki_hint; in __blkdev_direct_IO_simple()
268 bio.bi_ioprio = iocb->ki_ioprio; in __blkdev_direct_IO_simple()
280 bio.bi_opf = dio_bio_write_op(iocb); in __blkdev_direct_IO_simple()
283 if (iocb->ki_flags & IOCB_NOWAIT) in __blkdev_direct_IO_simple()
285 if (iocb->ki_flags & IOCB_HIPRI) in __blkdev_direct_IO_simple()
[all …]
Ddirect-io.c142 struct kiocb *iocb; /* kiocb */ member
238 loff_t offset = dio->iocb->ki_pos; in dio_complete()
272 err = dio->end_io(dio->iocb, offset, ret, dio->private); in dio_complete()
296 dio_warn_stale_pagecache(dio->iocb->ki_filp); in dio_complete()
307 dio->iocb->ki_pos += transferred; in dio_complete()
310 ret = generic_write_sync(dio->iocb, ret); in dio_complete()
311 dio->iocb->ki_complete(dio->iocb, ret, 0); in dio_complete()
410 bio->bi_write_hint = dio->iocb->ki_hint; in dio_bio_alloc()
482 if (!(dio->iocb->ki_flags & IOCB_HIPRI) || in dio_await_one()
1127 do_blockdev_direct_IO(struct kiocb *iocb, struct inode *inode, in do_blockdev_direct_IO() argument
[all …]
/kernel/linux/linux-5.10/fs/xfs/
Dxfs_file.c219 struct kiocb *iocb, in xfs_file_dio_aio_read() argument
222 struct xfs_inode *ip = XFS_I(file_inode(iocb->ki_filp)); in xfs_file_dio_aio_read()
226 trace_xfs_file_direct_read(ip, count, iocb->ki_pos); in xfs_file_dio_aio_read()
231 file_accessed(iocb->ki_filp); in xfs_file_dio_aio_read()
233 if (iocb->ki_flags & IOCB_NOWAIT) { in xfs_file_dio_aio_read()
239 ret = iomap_dio_rw(iocb, to, &xfs_read_iomap_ops, NULL, in xfs_file_dio_aio_read()
240 is_sync_kiocb(iocb)); in xfs_file_dio_aio_read()
248 struct kiocb *iocb, in xfs_file_dax_read() argument
251 struct xfs_inode *ip = XFS_I(iocb->ki_filp->f_mapping->host); in xfs_file_dax_read()
255 trace_xfs_file_dax_read(ip, count, iocb->ki_pos); in xfs_file_dax_read()
[all …]
/kernel/linux/linux-5.10/fs/iomap/
Ddirect-io.c27 struct kiocb *iocb; member
67 if (dio->iocb->ki_flags & IOCB_HIPRI) in iomap_dio_submit_bio()
68 bio_set_polled(bio, dio->iocb); in iomap_dio_submit_bio()
73 file_inode(dio->iocb->ki_filp), in iomap_dio_submit_bio()
82 struct kiocb *iocb = dio->iocb; in iomap_dio_complete() local
83 struct inode *inode = file_inode(iocb->ki_filp); in iomap_dio_complete()
84 loff_t offset = iocb->ki_pos; in iomap_dio_complete()
88 ret = dops->end_io(iocb, dio->size, ret, dio->flags); in iomap_dio_complete()
96 iocb->ki_pos += ret; in iomap_dio_complete()
118 dio_warn_stale_pagecache(iocb->ki_filp); in iomap_dio_complete()
[all …]
/kernel/linux/linux-5.10/fs/ocfs2/
Daops.h53 #define ocfs2_iocb_is_rw_locked(iocb) \ argument
54 test_bit(0, (unsigned long *)&iocb->private)
55 static inline void ocfs2_iocb_set_rw_locked(struct kiocb *iocb, int level) in ocfs2_iocb_set_rw_locked() argument
57 set_bit(0, (unsigned long *)&iocb->private); in ocfs2_iocb_set_rw_locked()
59 set_bit(1, (unsigned long *)&iocb->private); in ocfs2_iocb_set_rw_locked()
61 clear_bit(1, (unsigned long *)&iocb->private); in ocfs2_iocb_set_rw_locked()
75 #define ocfs2_iocb_clear_rw_locked(iocb) \ argument
76 clear_bit(OCFS2_IOCB_RW_LOCK, (unsigned long *)&iocb->private)
77 #define ocfs2_iocb_rw_locked_level(iocb) \ argument
78 test_bit(OCFS2_IOCB_RW_LOCK_LEVEL, (unsigned long *)&iocb->private)
/kernel/linux/linux-5.10/fs/overlayfs/
Dfile.c19 struct kiocb iocb; member
271 struct kiocb *iocb = &aio_req->iocb; in ovl_aio_cleanup_handler() local
274 if (iocb->ki_flags & IOCB_WRITE) { in ovl_aio_cleanup_handler()
278 __sb_writers_acquired(file_inode(iocb->ki_filp)->i_sb, in ovl_aio_cleanup_handler()
280 file_end_write(iocb->ki_filp); in ovl_aio_cleanup_handler()
284 orig_iocb->ki_pos = iocb->ki_pos; in ovl_aio_cleanup_handler()
288 static void ovl_aio_rw_complete(struct kiocb *iocb, long res, long res2) in ovl_aio_rw_complete() argument
290 struct ovl_aio_req *aio_req = container_of(iocb, in ovl_aio_rw_complete()
291 struct ovl_aio_req, iocb); in ovl_aio_rw_complete()
298 static ssize_t ovl_read_iter(struct kiocb *iocb, struct iov_iter *iter) in ovl_read_iter() argument
[all …]
/kernel/linux/linux-5.10/fs/zonefs/
Dsuper.c702 static int zonefs_file_write_dio_end_io(struct kiocb *iocb, ssize_t size, in zonefs_file_write_dio_end_io() argument
705 struct inode *inode = file_inode(iocb->ki_filp); in zonefs_file_write_dio_end_io()
722 if (i_size_read(inode) < iocb->ki_pos + size) { in zonefs_file_write_dio_end_io()
723 zonefs_update_stats(inode, iocb->ki_pos + size); in zonefs_file_write_dio_end_io()
724 zonefs_i_size_write(inode, iocb->ki_pos + size); in zonefs_file_write_dio_end_io()
736 static ssize_t zonefs_file_dio_append(struct kiocb *iocb, struct iov_iter *from) in zonefs_file_dio_append() argument
738 struct inode *inode = file_inode(iocb->ki_filp); in zonefs_file_dio_append()
761 bio->bi_write_hint = iocb->ki_hint; in zonefs_file_dio_append()
762 bio->bi_ioprio = iocb->ki_ioprio; in zonefs_file_dio_append()
764 if (iocb->ki_flags & IOCB_DSYNC) in zonefs_file_dio_append()
[all …]
/kernel/linux/patches/linux-5.10/imx8mm_patch/patches/
D0004_linux_fs.patch25 iocb_put(iocb);
104 list_del_init(&iocb->ki_list);
105 iocb->ki_res.res = mangle_poll(mask);
109 iocb_put(iocb);
110 @@ -1718,14 +1659,13 @@ static int aio_poll_cancel(struct kiocb *iocb)
111 struct aio_kiocb *aiocb = container_of(iocb, struct aio_kiocb, rw);
150 - spin_trylock_irqsave(&iocb->ki_ctx->ctx_lock, flags)) {
153 + if (mask && spin_trylock_irqsave(&iocb->ki_ctx->ctx_lock, flags)) {
154 struct kioctx *ctx = iocb->ki_ctx;
158 + * Try to complete the iocb inline if we can. Use
[all …]
/kernel/linux/linux-5.10/fs/nfs/
Ddirect.c73 struct kiocb * iocb; /* controlling i/o request */ member
164 ssize_t nfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter) in nfs_direct_IO() argument
166 struct inode *inode = iocb->ki_filp->f_mapping->host; 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()
246 if (dreq->iocb) in nfs_direct_wait()
272 if (dreq->iocb) { in nfs_direct_complete()
278 dreq->iocb->ki_complete(dreq->iocb, res, 0); in nfs_direct_complete()
443 ssize_t nfs_file_direct_read(struct kiocb *iocb, struct iov_iter *iter, in nfs_file_direct_read() argument
446 struct file *file = iocb->ki_filp; in nfs_file_direct_read()
[all …]
Dfile.c158 nfs_file_read(struct kiocb *iocb, struct iov_iter *to) in nfs_file_read() argument
160 struct inode *inode = file_inode(iocb->ki_filp); in nfs_file_read()
163 if (iocb->ki_flags & IOCB_DIRECT) in nfs_file_read()
164 return nfs_file_direct_read(iocb, to, false); in nfs_file_read()
167 iocb->ki_filp, in nfs_file_read()
168 iov_iter_count(to), (unsigned long) iocb->ki_pos); in nfs_file_read()
171 result = nfs_revalidate_mapping(inode, iocb->ki_filp->f_mapping); in nfs_file_read()
173 result = generic_file_read_iter(iocb, to); in nfs_file_read()
612 ssize_t nfs_file_write(struct kiocb *iocb, struct iov_iter *from) in nfs_file_write() argument
614 struct file *file = iocb->ki_filp; in nfs_file_write()
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/
Ddrm_dp_aux_dev.c146 static ssize_t auxdev_read_iter(struct kiocb *iocb, struct iov_iter *to) in auxdev_read_iter() argument
148 struct drm_dp_aux_dev *aux_dev = iocb->ki_filp->private_data; in auxdev_read_iter()
149 loff_t pos = iocb->ki_pos; in auxdev_read_iter()
179 if (pos != iocb->ki_pos) in auxdev_read_iter()
180 res = pos - iocb->ki_pos; in auxdev_read_iter()
181 iocb->ki_pos = pos; in auxdev_read_iter()
189 static ssize_t auxdev_write_iter(struct kiocb *iocb, struct iov_iter *from) in auxdev_write_iter() argument
191 struct drm_dp_aux_dev *aux_dev = iocb->ki_filp->private_data; in auxdev_write_iter()
192 loff_t pos = iocb->ki_pos; in auxdev_write_iter()
222 if (pos != iocb->ki_pos) in auxdev_write_iter()
[all …]
/kernel/linux/linux-5.10/tools/usb/ffs-aio-example/multibuff/device_app/
Daio_multibuff.c144 struct iocb **iocb; member
212 iobuf->iocb = malloc(n*sizeof(*iobuf->iocb)); in init_bufs()
218 iobuf->iocb[i] = malloc(sizeof(**iobuf->iocb)); in init_bufs()
228 free(iobuf->iocb[i]); in delete_bufs()
231 free(iobuf->iocb); in delete_bufs()
332 io_prep_pwrite(iobuf[i].iocb[j], ep1, in main()
336 iobuf[i].iocb[j]->u.c.flags |= IOCB_FLAG_RESFD; in main()
337 iobuf[i].iocb[j]->u.c.resfd = evfd; in main()
340 ret = io_submit(ctx, iobuf[i].cnt, iobuf[i].iocb); in main()
/kernel/linux/linux-5.10/fs/9p/
Dvfs_file.c383 v9fs_file_read_iter(struct kiocb *iocb, struct iov_iter *to) in v9fs_file_read_iter() argument
385 struct p9_fid *fid = iocb->ki_filp->private_data; in v9fs_file_read_iter()
389 iov_iter_count(to), iocb->ki_pos); in v9fs_file_read_iter()
391 if (iocb->ki_filp->f_flags & O_NONBLOCK) in v9fs_file_read_iter()
392 ret = p9_client_read_once(fid, iocb->ki_pos, to, &err); in v9fs_file_read_iter()
394 ret = p9_client_read(fid, iocb->ki_pos, to, &err); in v9fs_file_read_iter()
398 iocb->ki_pos += ret; in v9fs_file_read_iter()
411 v9fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from) in v9fs_file_write_iter() argument
413 struct file *file = iocb->ki_filp; in v9fs_file_write_iter()
418 retval = generic_write_checks(iocb, from); in v9fs_file_write_iter()
[all …]
/kernel/linux/linux-5.10/fs/sharefs/
Dfile.c161 sharefs_read_iter(struct kiocb *iocb, struct iov_iter *iter) in sharefs_read_iter() argument
164 struct file *file = iocb->ki_filp; in sharefs_read_iter()
175 iocb->ki_filp = lower_file; in sharefs_read_iter()
176 err = lower_file->f_op->read_iter(iocb, iter); in sharefs_read_iter()
177 iocb->ki_filp = file; in sharefs_read_iter()
192 sharefs_write_iter(struct kiocb *iocb, struct iov_iter *iter) in sharefs_write_iter() argument
195 struct file *file = iocb->ki_filp; in sharefs_write_iter()
205 iocb->ki_filp = lower_file; in sharefs_write_iter()
206 err = lower_file->f_op->write_iter(iocb, iter); in sharefs_write_iter()
207 iocb->ki_filp = file; in sharefs_write_iter()
/kernel/linux/linux-5.10/fs/gfs2/
Dfile.c785 static ssize_t gfs2_file_direct_read(struct kiocb *iocb, struct iov_iter *to, in gfs2_file_direct_read() argument
788 struct file *file = iocb->ki_filp; in gfs2_file_direct_read()
801 ret = iomap_dio_rw(iocb, to, &gfs2_iomap_ops, NULL, in gfs2_file_direct_read()
802 is_sync_kiocb(iocb)); in gfs2_file_direct_read()
810 static ssize_t gfs2_file_direct_write(struct kiocb *iocb, struct iov_iter *from, in gfs2_file_direct_write() argument
813 struct file *file = iocb->ki_filp; in gfs2_file_direct_write()
817 loff_t offset = iocb->ki_pos; in gfs2_file_direct_write()
837 ret = iomap_dio_rw(iocb, from, &gfs2_iomap_ops, NULL, in gfs2_file_direct_write()
838 is_sync_kiocb(iocb)); in gfs2_file_direct_write()
848 static ssize_t gfs2_file_read_iter(struct kiocb *iocb, struct iov_iter *to) in gfs2_file_read_iter() argument
[all …]
/kernel/linux/linux-5.10/fs/ceph/
Dfile.c866 static ssize_t ceph_sync_read(struct kiocb *iocb, struct iov_iter *to, in ceph_sync_read() argument
869 struct file *file = iocb->ki_filp; in ceph_sync_read()
875 u64 off = iocb->ki_pos; in ceph_sync_read()
982 if (off > iocb->ki_pos) { in ceph_sync_read()
986 ret = off - iocb->ki_pos; in ceph_sync_read()
987 iocb->ki_pos = off; in ceph_sync_read()
995 struct kiocb *iocb; member
1023 if (aio_req->iocb->ki_flags & IOCB_DIRECT) in ceph_aio_complete()
1035 loff_t endoff = aio_req->iocb->ki_pos + aio_req->total_len; in ceph_aio_complete()
1054 aio_req->iocb->ki_complete(aio_req->iocb, ret, 0); in ceph_aio_complete()
[all …]
/kernel/linux/linux-5.10/drivers/nvme/target/
Dio-cmd-file.c105 struct kiocb *iocb = &req->f.iocb; in nvmet_file_submit_bvec() local
106 ssize_t (*call_iter)(struct kiocb *iocb, struct iov_iter *iter); in nvmet_file_submit_bvec()
122 iocb->ki_pos = pos; in nvmet_file_submit_bvec()
123 iocb->ki_filp = req->ns->file; in nvmet_file_submit_bvec()
124 iocb->ki_flags = ki_flags | iocb_flags(req->ns->file); in nvmet_file_submit_bvec()
126 return call_iter(iocb, &iter); in nvmet_file_submit_bvec()
129 static void nvmet_file_io_done(struct kiocb *iocb, long ret, long ret2) in nvmet_file_io_done() argument
131 struct nvmet_req *req = container_of(iocb, struct nvmet_req, f.iocb); in nvmet_file_io_done()
166 memset(&req->f.iocb, 0, sizeof(struct kiocb)); in nvmet_file_execute_io()
203 req->f.iocb.ki_complete = nvmet_file_io_done; in nvmet_file_execute_io()
[all …]
/kernel/linux/linux-5.10/fs/cifs/
Dcifsfs.h105 extern ssize_t cifs_user_readv(struct kiocb *iocb, struct iov_iter *to);
106 extern ssize_t cifs_direct_readv(struct kiocb *iocb, struct iov_iter *to);
107 extern ssize_t cifs_strict_readv(struct kiocb *iocb, struct iov_iter *to);
108 extern ssize_t cifs_user_writev(struct kiocb *iocb, struct iov_iter *from);
109 extern ssize_t cifs_direct_writev(struct kiocb *iocb, struct iov_iter *from);
110 extern ssize_t cifs_strict_writev(struct kiocb *iocb, struct iov_iter *from);
/kernel/linux/linux-5.10/mm/
Dfilemap.c2189 ssize_t generic_file_buffered_read(struct kiocb *iocb, in generic_file_buffered_read() argument
2192 struct file *filp = iocb->ki_filp; in generic_file_buffered_read()
2196 loff_t *ppos = &iocb->ki_pos; in generic_file_buffered_read()
2219 if (written && (iocb->ki_flags & IOCB_WAITQ)) in generic_file_buffered_read()
2220 iocb->ki_flags |= IOCB_NOWAIT; in generic_file_buffered_read()
2237 if (iocb->ki_flags & IOCB_NOIO) in generic_file_buffered_read()
2247 if (iocb->ki_flags & IOCB_NOIO) { in generic_file_buffered_read()
2261 if (iocb->ki_flags & IOCB_WAITQ) { in generic_file_buffered_read()
2267 iocb->ki_waitq); in generic_file_buffered_read()
2269 if (iocb->ki_flags & IOCB_NOWAIT) { in generic_file_buffered_read()
[all …]
/kernel/linux/linux-5.10/fs/fuse/
Dfile.c675 struct inode *inode = file_inode(io->iocb->ki_filp); in fuse_aio_complete()
684 io->iocb->ki_complete(io->iocb, res, 0); in fuse_aio_complete()
767 struct file *file = ia->io->iocb->ki_filp; in fuse_send_read()
996 static ssize_t fuse_cache_read_iter(struct kiocb *iocb, struct iov_iter *to) in fuse_cache_read_iter() argument
998 struct inode *inode = iocb->ki_filp->f_mapping->host; in fuse_cache_read_iter()
1007 (iocb->ki_pos + iov_iter_count(to) > i_size_read(inode))) { in fuse_cache_read_iter()
1009 err = fuse_update_attributes(inode, iocb->ki_filp); in fuse_cache_read_iter()
1014 return generic_file_read_iter(iocb, to); in fuse_cache_read_iter()
1039 static unsigned int fuse_write_flags(struct kiocb *iocb) in fuse_write_flags() argument
1041 unsigned int flags = iocb->ki_filp->f_flags; in fuse_write_flags()
[all …]
/kernel/linux/linux-5.10/fs/udf/
Dfile.c107 static ssize_t udf_adinicb_direct_IO(struct kiocb *iocb, struct iov_iter *iter) in udf_adinicb_direct_IO() argument
135 static ssize_t udf_file_write_iter(struct kiocb *iocb, struct iov_iter *from) in udf_file_write_iter() argument
138 struct file *file = iocb->ki_filp; in udf_file_write_iter()
145 retval = generic_write_checks(iocb, from); in udf_file_write_iter()
152 iocb->ki_pos + iov_iter_count(from))) { in udf_file_write_iter()
162 retval = __generic_file_write_iter(iocb, from); in udf_file_write_iter()
172 retval = generic_write_sync(iocb, retval); in udf_file_write_iter()
/kernel/linux/linux-5.10/fs/coda/
Dfile.c38 coda_file_read_iter(struct kiocb *iocb, struct iov_iter *to) in coda_file_read_iter() argument
40 struct file *coda_file = iocb->ki_filp; in coda_file_read_iter()
43 loff_t ki_pos = iocb->ki_pos; in coda_file_read_iter()
53 ret = vfs_iter_read(cfi->cfi_container, to, &iocb->ki_pos, 0); in coda_file_read_iter()
63 coda_file_write_iter(struct kiocb *iocb, struct iov_iter *to) in coda_file_write_iter() argument
65 struct file *coda_file = iocb->ki_filp; in coda_file_write_iter()
69 loff_t ki_pos = iocb->ki_pos; in coda_file_write_iter()
81 ret = vfs_iter_write(cfi->cfi_container, to, &iocb->ki_pos, 0); in coda_file_write_iter()

123456