/fs/ext4/ |
D | file.c | 38 static ssize_t ext4_dax_read_iter(struct kiocb *iocb, struct iov_iter *to) in ext4_dax_read_iter() argument 40 struct inode *inode = file_inode(iocb->ki_filp); in ext4_dax_read_iter() 44 if (iocb->ki_flags & IOCB_NOWAIT) in ext4_dax_read_iter() 55 return generic_file_read_iter(iocb, to); in ext4_dax_read_iter() 57 ret = dax_iomap_rw(iocb, to, &ext4_iomap_ops); in ext4_dax_read_iter() 60 file_accessed(iocb->ki_filp); in ext4_dax_read_iter() 65 static ssize_t ext4_file_read_iter(struct kiocb *iocb, struct iov_iter *to) in ext4_file_read_iter() argument 67 if (unlikely(ext4_forced_shutdown(EXT4_SB(file_inode(iocb->ki_filp)->i_sb)))) in ext4_file_read_iter() 74 if (IS_DAX(file_inode(iocb->ki_filp))) in ext4_file_read_iter() 75 return ext4_dax_read_iter(iocb, to); in ext4_file_read_iter() [all …]
|
/fs/ |
D | aio.c | 561 void kiocb_set_cancel_fn(struct kiocb *iocb, kiocb_cancel_fn *cancel) in kiocb_set_cancel_fn() argument 563 struct aio_kiocb *req = container_of(iocb, struct aio_kiocb, rw); in kiocb_set_cancel_fn() 1075 static inline void iocb_destroy(struct aio_kiocb *iocb) in iocb_destroy() argument 1077 if (iocb->ki_eventfd) in iocb_destroy() 1078 eventfd_ctx_put(iocb->ki_eventfd); in iocb_destroy() 1079 if (iocb->ki_filp) in iocb_destroy() 1080 fput(iocb->ki_filp); in iocb_destroy() 1081 percpu_ref_put(&iocb->ki_ctx->reqs); in iocb_destroy() 1082 kmem_cache_free(kiocb_cachep, iocb); in iocb_destroy() 1088 static void aio_complete(struct aio_kiocb *iocb) in aio_complete() argument [all …]
|
D | block_dev.c | 181 static unsigned int dio_bio_write_op(struct kiocb *iocb) in dio_bio_write_op() argument 186 if (iocb->ki_flags & IOCB_DSYNC) in dio_bio_write_op() 202 __blkdev_direct_IO_simple(struct kiocb *iocb, struct iov_iter *iter, in __blkdev_direct_IO_simple() argument 205 struct file *file = iocb->ki_filp; in __blkdev_direct_IO_simple() 208 loff_t pos = iocb->ki_pos; in __blkdev_direct_IO_simple() 230 bio.bi_write_hint = iocb->ki_hint; in __blkdev_direct_IO_simple() 233 bio.bi_ioprio = iocb->ki_ioprio; in __blkdev_direct_IO_simple() 245 bio.bi_opf = dio_bio_write_op(iocb); in __blkdev_direct_IO_simple() 248 if (iocb->ki_flags & IOCB_HIPRI) in __blkdev_direct_IO_simple() 249 bio_set_polled(&bio, iocb); in __blkdev_direct_IO_simple() [all …]
|
D | direct-io.c | 141 struct kiocb *iocb; /* kiocb */ member 258 loff_t offset = dio->iocb->ki_pos; in dio_complete() 292 err = dio->end_io(dio->iocb, offset, ret, dio->private); in dio_complete() 316 dio_warn_stale_pagecache(dio->iocb->ki_filp); in dio_complete() 327 dio->iocb->ki_pos += transferred; in dio_complete() 330 ret = generic_write_sync(dio->iocb, ret); in dio_complete() 331 dio->iocb->ki_complete(dio->iocb, ret, 0); in dio_complete() 453 bio->bi_write_hint = dio->iocb->ki_hint; in dio_bio_alloc() 525 if (!(dio->iocb->ki_flags & IOCB_HIPRI) || in dio_await_one() 1169 do_blockdev_direct_IO(struct kiocb *iocb, struct inode *inode, in do_blockdev_direct_IO() argument [all …]
|
/fs/xfs/ |
D | xfs_file.c | 176 struct kiocb *iocb, in xfs_file_dio_aio_read() argument 179 struct xfs_inode *ip = XFS_I(file_inode(iocb->ki_filp)); in xfs_file_dio_aio_read() 183 trace_xfs_file_direct_read(ip, count, iocb->ki_pos); in xfs_file_dio_aio_read() 188 file_accessed(iocb->ki_filp); in xfs_file_dio_aio_read() 191 ret = iomap_dio_rw(iocb, to, &xfs_iomap_ops, NULL); in xfs_file_dio_aio_read() 199 struct kiocb *iocb, in xfs_file_dax_read() argument 202 struct xfs_inode *ip = XFS_I(iocb->ki_filp->f_mapping->host); in xfs_file_dax_read() 206 trace_xfs_file_dax_read(ip, count, iocb->ki_pos); in xfs_file_dax_read() 211 if (iocb->ki_flags & IOCB_NOWAIT) { in xfs_file_dax_read() 218 ret = dax_iomap_rw(iocb, to, &xfs_iomap_ops); in xfs_file_dax_read() [all …]
|
/fs/ext2/ |
D | file.c | 33 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 …]
|
/fs/iomap/ |
D | direct-io.c | 27 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() 77 struct kiocb *iocb = dio->iocb; in iomap_dio_complete() local 78 struct inode *inode = file_inode(iocb->ki_filp); in iomap_dio_complete() 79 loff_t offset = iocb->ki_pos; in iomap_dio_complete() 83 ret = dops->end_io(iocb, dio->size, ret, dio->flags); in iomap_dio_complete() 91 iocb->ki_pos += ret; in iomap_dio_complete() 113 dio_warn_stale_pagecache(iocb->ki_filp); in iomap_dio_complete() 121 ret = generic_write_sync(iocb, ret); in iomap_dio_complete() [all …]
|
/fs/ocfs2/ |
D | aops.h | 53 #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)
|
D | file.c | 2277 static ssize_t ocfs2_file_write_iter(struct kiocb *iocb, in ocfs2_file_write_iter() argument 2284 struct file *file = iocb->ki_filp; in ocfs2_file_write_iter() 2290 int append_write = ((iocb->ki_pos + count) >= in ocfs2_file_write_iter() 2292 int direct_io = iocb->ki_flags & IOCB_DIRECT ? 1 : 0; in ocfs2_file_write_iter() 2293 int nowait = iocb->ki_flags & IOCB_NOWAIT ? 1 : 0; in ocfs2_file_write_iter() 2353 ret = generic_write_checks(iocb, from); in ocfs2_file_write_iter() 2361 ret = ocfs2_prepare_inode_for_write(file, iocb->ki_pos, count, !nowait); in ocfs2_file_write_iter() 2368 if (direct_io && !is_sync_kiocb(iocb) && in ocfs2_file_write_iter() 2369 ocfs2_is_io_unaligned(inode, count, iocb->ki_pos)) { in ocfs2_file_write_iter() 2373 saved_ki_complete = xchg(&iocb->ki_complete, NULL); in ocfs2_file_write_iter() [all …]
|
/fs/nfs/ |
D | direct.c | 73 struct kiocb * iocb; /* controlling i/o request */ member 264 ssize_t nfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter) in nfs_direct_IO() argument 266 struct inode *inode = iocb->ki_filp->f_mapping->host; in nfs_direct_IO() 275 return nfs_file_direct_read(iocb, iter); in nfs_direct_IO() 276 return nfs_file_direct_write(iocb, iter); in nfs_direct_IO() 346 if (dreq->iocb) in nfs_direct_wait() 372 if (dreq->iocb) { in nfs_direct_complete() 378 dreq->iocb->ki_complete(dreq->iocb, res, 0); in nfs_direct_complete() 542 ssize_t nfs_file_direct_read(struct kiocb *iocb, struct iov_iter *iter) in nfs_file_direct_read() argument 544 struct file *file = iocb->ki_filp; in nfs_file_direct_read() [all …]
|
D | file.c | 155 nfs_file_read(struct kiocb *iocb, struct iov_iter *to) in nfs_file_read() argument 157 struct inode *inode = file_inode(iocb->ki_filp); in nfs_file_read() 160 if (iocb->ki_flags & IOCB_DIRECT) in nfs_file_read() 161 return nfs_file_direct_read(iocb, to); in nfs_file_read() 164 iocb->ki_filp, in nfs_file_read() 165 iov_iter_count(to), (unsigned long) iocb->ki_pos); in nfs_file_read() 168 result = nfs_revalidate_mapping(inode, iocb->ki_filp->f_mapping); in nfs_file_read() 170 result = generic_file_read_iter(iocb, to); in nfs_file_read() 593 ssize_t nfs_file_write(struct kiocb *iocb, struct iov_iter *from) in nfs_file_write() argument 595 struct file *file = iocb->ki_filp; in nfs_file_write() [all …]
|
/fs/ceph/ |
D | file.c | 582 static ssize_t ceph_sync_read(struct kiocb *iocb, struct iov_iter *to, in ceph_sync_read() argument 585 struct file *file = iocb->ki_filp; in ceph_sync_read() 591 u64 off = iocb->ki_pos; in ceph_sync_read() 715 if (off > iocb->ki_pos) { in ceph_sync_read() 719 ret = off - iocb->ki_pos; in ceph_sync_read() 720 iocb->ki_pos = off; in ceph_sync_read() 728 struct kiocb *iocb; member 756 if (aio_req->iocb->ki_flags & IOCB_DIRECT) in ceph_aio_complete() 768 loff_t endoff = aio_req->iocb->ki_pos + aio_req->total_len; in ceph_aio_complete() 787 aio_req->iocb->ki_complete(aio_req->iocb, ret, 0); in ceph_aio_complete() [all …]
|
/fs/9p/ |
D | vfs_file.c | 383 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 ret = p9_client_read(fid, iocb->ki_pos, to, &err); in v9fs_file_read_iter() 395 iocb->ki_pos += ret; in v9fs_file_read_iter() 408 v9fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from) in v9fs_file_write_iter() argument 410 struct file *file = iocb->ki_filp; in v9fs_file_write_iter() 415 retval = generic_write_checks(iocb, from); in v9fs_file_write_iter() 419 origin = iocb->ki_pos; in v9fs_file_write_iter() 420 retval = p9_client_write(file->private_data, iocb->ki_pos, from, &err); in v9fs_file_write_iter() [all …]
|
D | vfs_addr.c | 235 v9fs_direct_IO(struct kiocb *iocb, struct iov_iter *iter) in v9fs_direct_IO() argument 237 struct file *file = iocb->ki_filp; in v9fs_direct_IO() 238 loff_t pos = iocb->ki_pos; in v9fs_direct_IO()
|
/fs/orangefs/ |
D | file.c | 310 static ssize_t orangefs_file_read_iter(struct kiocb *iocb, in orangefs_file_read_iter() argument 323 if (!iocb->ki_filp->private_data) { in orangefs_file_read_iter() 324 iocb->ki_filp->private_data = kmalloc(sizeof *ro, GFP_KERNEL); in orangefs_file_read_iter() 325 if (!iocb->ki_filp->private_data) in orangefs_file_read_iter() 327 ro = iocb->ki_filp->private_data; in orangefs_file_read_iter() 331 down_read(&file_inode(iocb->ki_filp)->i_rwsem); in orangefs_file_read_iter() 332 ret = orangefs_revalidate_mapping(file_inode(iocb->ki_filp)); in orangefs_file_read_iter() 336 ret = generic_file_read_iter(iocb, iter); in orangefs_file_read_iter() 338 up_read(&file_inode(iocb->ki_filp)->i_rwsem); in orangefs_file_read_iter() 342 static ssize_t orangefs_file_write_iter(struct kiocb *iocb, in orangefs_file_write_iter() argument [all …]
|
/fs/gfs2/ |
D | file.c | 746 static ssize_t gfs2_file_direct_read(struct kiocb *iocb, struct iov_iter *to) in gfs2_file_direct_read() argument 748 struct file *file = iocb->ki_filp; in gfs2_file_direct_read() 762 ret = iomap_dio_rw(iocb, to, &gfs2_iomap_ops, NULL); in gfs2_file_direct_read() 770 static ssize_t gfs2_file_direct_write(struct kiocb *iocb, struct iov_iter *from) in gfs2_file_direct_write() argument 772 struct file *file = iocb->ki_filp; in gfs2_file_direct_write() 776 loff_t offset = iocb->ki_pos; in gfs2_file_direct_write() 797 ret = iomap_dio_rw(iocb, from, &gfs2_iomap_ops, NULL); in gfs2_file_direct_write() 806 static ssize_t gfs2_file_read_iter(struct kiocb *iocb, struct iov_iter *to) in gfs2_file_read_iter() argument 810 if (iocb->ki_flags & IOCB_DIRECT) { in gfs2_file_read_iter() 811 ret = gfs2_file_direct_read(iocb, to); in gfs2_file_read_iter() [all …]
|
/fs/fuse/ |
D | file.c | 634 struct inode *inode = file_inode(io->iocb->ki_filp); in fuse_aio_complete() 643 io->iocb->ki_complete(io->iocb, res, 0); in fuse_aio_complete() 725 struct file *file = ia->io->iocb->ki_filp; in fuse_send_read() 986 static ssize_t fuse_cache_read_iter(struct kiocb *iocb, struct iov_iter *to) in fuse_cache_read_iter() argument 988 struct inode *inode = iocb->ki_filp->f_mapping->host; in fuse_cache_read_iter() 997 (iocb->ki_pos + iov_iter_count(to) > i_size_read(inode))) { in fuse_cache_read_iter() 999 err = fuse_update_attributes(inode, iocb->ki_filp); in fuse_cache_read_iter() 1004 return generic_file_read_iter(iocb, to); in fuse_cache_read_iter() 1029 static unsigned int fuse_write_flags(struct kiocb *iocb) in fuse_write_flags() argument 1031 unsigned int flags = iocb->ki_filp->f_flags; in fuse_write_flags() [all …]
|
/fs/cifs/ |
D | cifsfs.h | 105 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);
|
D | file.c | 3055 if (ctx->iocb && ctx->iocb->ki_complete) in collect_uncached_write_data() 3056 ctx->iocb->ki_complete(ctx->iocb, ctx->rc, 0); in collect_uncached_write_data() 3062 struct kiocb *iocb, struct iov_iter *from, bool direct) in __cifs_writev() argument 3064 struct file *file = iocb->ki_filp; in __cifs_writev() 3084 rc = generic_write_checks(iocb, from); in __cifs_writev() 3101 if (!is_sync_kiocb(iocb)) in __cifs_writev() 3102 ctx->iocb = iocb; in __cifs_writev() 3104 ctx->pos = iocb->ki_pos; in __cifs_writev() 3121 rc = cifs_write_from_iter(iocb->ki_pos, ctx->len, &saved_from, in __cifs_writev() 3140 if (!is_sync_kiocb(iocb)) { in __cifs_writev() [all …]
|
/fs/sdcardfs/ |
D | file.c | 378 ssize_t sdcardfs_read_iter(struct kiocb *iocb, struct iov_iter *iter) in sdcardfs_read_iter() argument 381 struct file *file = iocb->ki_filp, *lower_file; in sdcardfs_read_iter() 390 iocb->ki_filp = lower_file; in sdcardfs_read_iter() 391 err = lower_file->f_op->read_iter(iocb, iter); in sdcardfs_read_iter() 392 iocb->ki_filp = file; in sdcardfs_read_iter() 405 ssize_t sdcardfs_write_iter(struct kiocb *iocb, struct iov_iter *iter) in sdcardfs_write_iter() argument 408 struct file *file = iocb->ki_filp, *lower_file; in sdcardfs_write_iter() 418 iocb->ki_filp = lower_file; in sdcardfs_write_iter() 419 err = lower_file->f_op->write_iter(iocb, iter); in sdcardfs_write_iter() 420 iocb->ki_filp = file; in sdcardfs_write_iter()
|
/fs/coda/ |
D | file.c | 38 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()
|
/fs/udf/ |
D | file.c | 108 static ssize_t udf_adinicb_direct_IO(struct kiocb *iocb, struct iov_iter *iter) in udf_adinicb_direct_IO() argument 136 static ssize_t udf_file_write_iter(struct kiocb *iocb, struct iov_iter *from) in udf_file_write_iter() argument 139 struct file *file = iocb->ki_filp; in udf_file_write_iter() 146 retval = generic_write_checks(iocb, from); in udf_file_write_iter() 152 loff_t end = iocb->ki_pos + iov_iter_count(from); in udf_file_write_iter() 169 retval = __generic_file_write_iter(iocb, from); in udf_file_write_iter() 175 retval = generic_write_sync(iocb, retval); in udf_file_write_iter()
|
/fs/overlayfs/ |
D | file.c | 211 static rwf_t ovl_iocb_to_rwf(struct kiocb *iocb) in ovl_iocb_to_rwf() argument 213 int ifl = iocb->ki_flags; in ovl_iocb_to_rwf() 228 static ssize_t ovl_read_iter(struct kiocb *iocb, struct iov_iter *iter) in ovl_read_iter() argument 230 struct file *file = iocb->ki_filp; in ovl_read_iter() 243 ret = vfs_iter_read(real.file, iter, &iocb->ki_pos, in ovl_read_iter() 244 ovl_iocb_to_rwf(iocb)); in ovl_read_iter() 254 static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter) in ovl_write_iter() argument 256 struct file *file = iocb->ki_filp; in ovl_write_iter() 278 ret = vfs_iter_write(real.file, iter, &iocb->ki_pos, in ovl_write_iter() 279 ovl_iocb_to_rwf(iocb)); in ovl_write_iter()
|
/fs/jfs/ |
D | inode.c | 334 static ssize_t jfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter) in jfs_direct_IO() argument 336 struct file *file = iocb->ki_filp; in jfs_direct_IO() 342 ret = blockdev_direct_IO(iocb, inode, iter, jfs_get_block); in jfs_direct_IO() 350 loff_t end = iocb->ki_pos + count; in jfs_direct_IO()
|
/fs/btrfs/ |
D | file.c | 1585 static noinline ssize_t btrfs_buffered_write(struct kiocb *iocb, in btrfs_buffered_write() argument 1588 struct file *file = iocb->ki_filp; in btrfs_buffered_write() 1589 loff_t pos = iocb->ki_pos; in btrfs_buffered_write() 1827 static ssize_t __btrfs_direct_write(struct kiocb *iocb, struct iov_iter *from) in __btrfs_direct_write() argument 1829 struct file *file = iocb->ki_filp; in __btrfs_direct_write() 1837 written = generic_file_direct_write(iocb, from); in __btrfs_direct_write() 1842 pos = iocb->ki_pos; in __btrfs_direct_write() 1843 written_buffered = btrfs_buffered_write(iocb, from); in __btrfs_direct_write() 1860 iocb->ki_pos = pos + written_buffered; in __btrfs_direct_write() 1885 static ssize_t btrfs_file_write_iter(struct kiocb *iocb, in btrfs_file_write_iter() argument [all …]
|