/fs/xfs/ |
D | xfs_file.c | 205 struct kiocb *iocb, in xfs_file_dio_aio_read() argument 208 struct xfs_inode *ip = XFS_I(file_inode(iocb->ki_filp)); in xfs_file_dio_aio_read() 212 trace_xfs_file_direct_read(ip, count, iocb->ki_pos); in xfs_file_dio_aio_read() 217 file_accessed(iocb->ki_filp); in xfs_file_dio_aio_read() 220 ret = iomap_dio_rw(iocb, to, &xfs_iomap_ops, NULL); in xfs_file_dio_aio_read() 228 struct kiocb *iocb, in xfs_file_dax_read() argument 231 struct xfs_inode *ip = XFS_I(iocb->ki_filp->f_mapping->host); in xfs_file_dax_read() 235 trace_xfs_file_dax_read(ip, count, iocb->ki_pos); in xfs_file_dax_read() 240 if (iocb->ki_flags & IOCB_NOWAIT) { in xfs_file_dax_read() 247 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/ext4/ |
D | file.c | 36 static ssize_t ext4_dax_read_iter(struct kiocb *iocb, struct iov_iter *to) in ext4_dax_read_iter() argument 38 struct inode *inode = file_inode(iocb->ki_filp); in ext4_dax_read_iter() 41 if (iocb->ki_flags & IOCB_NOWAIT) { in ext4_dax_read_iter() 54 return generic_file_read_iter(iocb, to); in ext4_dax_read_iter() 56 ret = dax_iomap_rw(iocb, to, &ext4_iomap_ops); in ext4_dax_read_iter() 59 file_accessed(iocb->ki_filp); in ext4_dax_read_iter() 64 static ssize_t ext4_file_read_iter(struct kiocb *iocb, struct iov_iter *to) in ext4_file_read_iter() argument 66 if (unlikely(ext4_forced_shutdown(EXT4_SB(file_inode(iocb->ki_filp)->i_sb)))) in ext4_file_read_iter() 73 if (IS_DAX(file_inode(iocb->ki_filp))) in ext4_file_read_iter() 74 return ext4_dax_read_iter(iocb, to); in ext4_file_read_iter() [all …]
|
/fs/ocfs2/ |
D | aops.h | 67 #define ocfs2_iocb_is_rw_locked(iocb) \ argument 68 test_bit(0, (unsigned long *)&iocb->private) 69 static inline void ocfs2_iocb_set_rw_locked(struct kiocb *iocb, int level) in ocfs2_iocb_set_rw_locked() argument 71 set_bit(0, (unsigned long *)&iocb->private); in ocfs2_iocb_set_rw_locked() 73 set_bit(1, (unsigned long *)&iocb->private); in ocfs2_iocb_set_rw_locked() 75 clear_bit(1, (unsigned long *)&iocb->private); in ocfs2_iocb_set_rw_locked() 89 #define ocfs2_iocb_clear_rw_locked(iocb) \ argument 90 clear_bit(OCFS2_IOCB_RW_LOCK, (unsigned long *)&iocb->private) 91 #define ocfs2_iocb_rw_locked_level(iocb) \ argument 92 test_bit(OCFS2_IOCB_RW_LOCK_LEVEL, (unsigned long *)&iocb->private)
|
D | file.c | 2211 static ssize_t ocfs2_file_write_iter(struct kiocb *iocb, in ocfs2_file_write_iter() argument 2218 struct file *file = iocb->ki_filp; in ocfs2_file_write_iter() 2224 int append_write = ((iocb->ki_pos + count) >= in ocfs2_file_write_iter() 2236 direct_io = iocb->ki_flags & IOCB_DIRECT ? 1 : 0; in ocfs2_file_write_iter() 2272 ret = generic_write_checks(iocb, from); in ocfs2_file_write_iter() 2280 ret = ocfs2_prepare_inode_for_write(file, iocb->ki_pos, count); in ocfs2_file_write_iter() 2286 if (direct_io && !is_sync_kiocb(iocb) && in ocfs2_file_write_iter() 2287 ocfs2_is_io_unaligned(inode, count, iocb->ki_pos)) { in ocfs2_file_write_iter() 2291 saved_ki_complete = xchg(&iocb->ki_complete, NULL); in ocfs2_file_write_iter() 2295 ocfs2_iocb_set_rw_locked(iocb, rw_level); in ocfs2_file_write_iter() [all …]
|
/fs/ |
D | aio.c | 180 struct iocb __user *ki_user_iocb; /* user's aiocb */ 555 void kiocb_set_cancel_fn(struct kiocb *iocb, kiocb_cancel_fn *cancel) in kiocb_set_cancel_fn() argument 557 struct aio_kiocb *req = container_of(iocb, struct aio_kiocb, common); in kiocb_set_cancel_fn() 1104 struct aio_kiocb *iocb = container_of(kiocb, struct aio_kiocb, common); in aio_complete() local 1105 struct kioctx *ctx = iocb->ki_ctx; in aio_complete() 1132 if (iocb->ki_list.next) { in aio_complete() 1136 list_del(&iocb->ki_list); in aio_complete() 1156 event->obj = (u64)(unsigned long)iocb->ki_user_iocb; in aio_complete() 1157 event->data = iocb->ki_user_data; in aio_complete() 1165 ctx, tail, iocb, iocb->ki_user_iocb, iocb->ki_user_data, in aio_complete() [all …]
|
D | iomap.c | 233 iomap_file_buffered_write(struct kiocb *iocb, struct iov_iter *iter, in iomap_file_buffered_write() argument 236 struct inode *inode = iocb->ki_filp->f_mapping->host; in iomap_file_buffered_write() 237 loff_t pos = iocb->ki_pos, ret = 0, written = 0; in iomap_file_buffered_write() 689 struct kiocb *iocb; member 716 struct kiocb *iocb = dio->iocb; in iomap_dio_complete() local 717 struct inode *inode = file_inode(iocb->ki_filp); in iomap_dio_complete() 718 loff_t offset = iocb->ki_pos; in iomap_dio_complete() 722 ret = dio->end_io(iocb, in iomap_dio_complete() 735 iocb->ki_pos += ret; in iomap_dio_complete() 757 dio_warn_stale_pagecache(iocb->ki_filp); in iomap_dio_complete() [all …]
|
D | block_dev.c | 193 static unsigned int dio_bio_write_op(struct kiocb *iocb) in dio_bio_write_op() argument 198 if (iocb->ki_flags & IOCB_DSYNC) in dio_bio_write_op() 214 __blkdev_direct_IO_simple(struct kiocb *iocb, struct iov_iter *iter, in __blkdev_direct_IO_simple() argument 217 struct file *file = iocb->ki_filp; in __blkdev_direct_IO_simple() 220 loff_t pos = iocb->ki_pos; in __blkdev_direct_IO_simple() 242 bio.bi_write_hint = iocb->ki_hint; in __blkdev_direct_IO_simple() 256 bio.bi_opf = dio_bio_write_op(iocb); in __blkdev_direct_IO_simple() 265 if (!(iocb->ki_flags & IOCB_HIPRI) || in __blkdev_direct_IO_simple() 291 struct kiocb *iocb; member 314 struct kiocb *iocb = dio->iocb; in blkdev_bio_end_io() local [all …]
|
D | direct-io.c | 139 struct kiocb *iocb; /* kiocb */ member 257 loff_t offset = dio->iocb->ki_pos; in dio_complete() 291 err = dio->end_io(dio->iocb, offset, ret, dio->private); in dio_complete() 315 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() 449 bio->bi_write_hint = dio->iocb->ki_hint; in dio_bio_alloc() 521 if (!(dio->iocb->ki_flags & IOCB_HIPRI) || in dio_await_one() 1173 do_blockdev_direct_IO(struct kiocb *iocb, struct inode *inode, in do_blockdev_direct_IO() argument [all …]
|
/fs/ceph/ |
D | file.c | 555 static ssize_t ceph_sync_read(struct kiocb *iocb, struct iov_iter *to, in ceph_sync_read() argument 558 struct file *file = iocb->ki_filp; in ceph_sync_read() 561 u64 off = iocb->ki_pos; in ceph_sync_read() 626 if (off > iocb->ki_pos) { in ceph_sync_read() 627 ret = off - iocb->ki_pos; in ceph_sync_read() 628 iocb->ki_pos = off; in ceph_sync_read() 636 struct kiocb *iocb; member 673 loff_t endoff = aio_req->iocb->ki_pos + aio_req->total_len; in ceph_aio_complete() 692 aio_req->iocb->ki_complete(aio_req->iocb, ret, 0); in ceph_aio_complete() 736 loff_t endoff = aio_req->iocb->ki_pos + rc; in ceph_aio_complete_req() [all …]
|
/fs/nfs/ |
D | direct.c | 79 struct kiocb * iocb; /* controlling i/o request */ member 280 ssize_t nfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter) in nfs_direct_IO() argument 282 struct inode *inode = iocb->ki_filp->f_mapping->host; in nfs_direct_IO() 291 return nfs_file_direct_read(iocb, iter); in nfs_direct_IO() 292 return nfs_file_direct_write(iocb, iter); in nfs_direct_IO() 375 if (dreq->iocb) in nfs_direct_wait() 401 if (dreq->iocb) { in nfs_direct_complete() 407 dreq->iocb->ki_complete(dreq->iocb, res, 0); in nfs_direct_complete() 571 ssize_t nfs_file_direct_read(struct kiocb *iocb, struct iov_iter *iter) in nfs_file_direct_read() argument 573 struct file *file = iocb->ki_filp; in nfs_file_direct_read() [all …]
|
D | file.c | 154 nfs_file_read(struct kiocb *iocb, struct iov_iter *to) in nfs_file_read() argument 156 struct inode *inode = file_inode(iocb->ki_filp); in nfs_file_read() 159 if (iocb->ki_flags & IOCB_DIRECT) in nfs_file_read() 160 return nfs_file_direct_read(iocb, to); in nfs_file_read() 163 iocb->ki_filp, in nfs_file_read() 164 iov_iter_count(to), (unsigned long) iocb->ki_pos); in nfs_file_read() 167 result = nfs_revalidate_mapping(inode, iocb->ki_filp->f_mapping); in nfs_file_read() 169 result = generic_file_read_iter(iocb, to); in nfs_file_read() 597 ssize_t nfs_file_write(struct kiocb *iocb, struct iov_iter *from) in nfs_file_write() argument 599 struct file *file = iocb->ki_filp; in nfs_file_write() [all …]
|
/fs/9p/ |
D | vfs_file.c | 398 v9fs_file_read_iter(struct kiocb *iocb, struct iov_iter *to) in v9fs_file_read_iter() argument 400 struct p9_fid *fid = iocb->ki_filp->private_data; in v9fs_file_read_iter() 404 iov_iter_count(to), iocb->ki_pos); in v9fs_file_read_iter() 406 ret = p9_client_read(fid, iocb->ki_pos, to, &err); in v9fs_file_read_iter() 410 iocb->ki_pos += ret; in v9fs_file_read_iter() 423 v9fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from) in v9fs_file_write_iter() argument 425 struct file *file = iocb->ki_filp; in v9fs_file_write_iter() 430 retval = generic_write_checks(iocb, from); in v9fs_file_write_iter() 434 origin = iocb->ki_pos; in v9fs_file_write_iter() 435 retval = p9_client_write(file->private_data, iocb->ki_pos, from, &err); in v9fs_file_write_iter() [all …]
|
D | vfs_addr.c | 250 v9fs_direct_IO(struct kiocb *iocb, struct iov_iter *iter) in v9fs_direct_IO() argument 252 struct file *file = iocb->ki_filp; in v9fs_direct_IO() 253 loff_t pos = iocb->ki_pos; in v9fs_direct_IO()
|
/fs/ncpfs/ |
D | file.c | 102 ncp_file_read_iter(struct kiocb *iocb, struct iov_iter *to) in ncp_file_read_iter() argument 104 struct file *file = iocb->ki_filp; in ncp_file_read_iter() 107 off_t pos = iocb->ki_pos; in ncp_file_read_iter() 158 iocb->ki_pos = pos; in ncp_file_read_iter() 169 ncp_file_write_iter(struct kiocb *iocb, struct iov_iter *from) in ncp_file_write_iter() argument 171 struct file *file = iocb->ki_filp; in ncp_file_write_iter() 180 errno = generic_write_checks(iocb, from); in ncp_file_write_iter() 200 pos = iocb->ki_pos; in ncp_file_write_iter() 225 iocb->ki_pos = pos; in ncp_file_write_iter()
|
/fs/orangefs/ |
D | file.c | 446 static ssize_t orangefs_file_read_iter(struct kiocb *iocb, struct iov_iter *iter) in orangefs_file_read_iter() argument 448 struct file *file = iocb->ki_filp; in orangefs_file_read_iter() 449 loff_t pos = iocb->ki_pos; in orangefs_file_read_iter() 452 BUG_ON(iocb->private); in orangefs_file_read_iter() 459 iocb->ki_pos = pos; in orangefs_file_read_iter() 464 static ssize_t orangefs_file_write_iter(struct kiocb *iocb, struct iov_iter *iter) in orangefs_file_write_iter() argument 466 struct file *file = iocb->ki_filp; in orangefs_file_write_iter() 470 BUG_ON(iocb->private); in orangefs_file_write_iter() 489 rc = generic_write_checks(iocb, iter); in orangefs_file_write_iter() 502 pos = iocb->ki_pos; in orangefs_file_write_iter() [all …]
|
/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/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/fuse/ |
D | file.c | 599 struct inode *inode = file_inode(io->iocb->ki_filp); in fuse_aio_complete() 608 io->iocb->ki_complete(io->iocb, res, 0); in fuse_aio_complete() 655 struct file *file = io->iocb->ki_filp; in fuse_send_read() 717 struct kiocb iocb; in fuse_do_readpage() local 746 init_sync_kiocb(&iocb, file); in fuse_do_readpage() 747 io = (struct fuse_io_priv) FUSE_IO_PRIV_SYNC(&iocb); in fuse_do_readpage() 924 static ssize_t fuse_file_read_iter(struct kiocb *iocb, struct iov_iter *to) in fuse_file_read_iter() argument 926 struct inode *inode = iocb->ki_filp->f_mapping->host; in fuse_file_read_iter() 935 (iocb->ki_pos + iov_iter_count(to) > i_size_read(inode))) { in fuse_file_read_iter() 937 err = fuse_update_attributes(inode, iocb->ki_filp); in fuse_file_read_iter() [all …]
|
/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() 45 return vfs_iter_read(cfi->cfi_container, to, &iocb->ki_pos, 0); in coda_file_read_iter() 49 coda_file_write_iter(struct kiocb *iocb, struct iov_iter *to) in coda_file_write_iter() argument 51 struct file *coda_file = iocb->ki_filp; in coda_file_write_iter() 62 ret = vfs_iter_write(cfi->cfi_container, to, &iocb->ki_pos, 0); in coda_file_write_iter()
|
/fs/cifs/ |
D | cifsfs.h | 104 extern ssize_t cifs_user_readv(struct kiocb *iocb, struct iov_iter *to); 105 extern ssize_t cifs_strict_readv(struct kiocb *iocb, struct iov_iter *to); 106 extern ssize_t cifs_user_writev(struct kiocb *iocb, struct iov_iter *from); 107 extern ssize_t cifs_strict_writev(struct kiocb *iocb, struct iov_iter *from);
|
D | file.c | 2778 if (ctx->iocb && ctx->iocb->ki_complete) in collect_uncached_write_data() 2779 ctx->iocb->ki_complete(ctx->iocb, ctx->rc, 0); in collect_uncached_write_data() 2784 ssize_t cifs_user_writev(struct kiocb *iocb, struct iov_iter *from) in cifs_user_writev() argument 2786 struct file *file = iocb->ki_filp; in cifs_user_writev() 2801 rc = generic_write_checks(iocb, from); in cifs_user_writev() 2818 if (!is_sync_kiocb(iocb)) in cifs_user_writev() 2819 ctx->iocb = iocb; in cifs_user_writev() 2821 ctx->pos = iocb->ki_pos; in cifs_user_writev() 2832 rc = cifs_write_from_iter(iocb->ki_pos, ctx->len, &saved_from, in cifs_user_writev() 2851 if (!is_sync_kiocb(iocb)) { in cifs_user_writev() [all …]
|
D | cifsfs.c | 770 cifs_loose_read_iter(struct kiocb *iocb, struct iov_iter *iter) in cifs_loose_read_iter() argument 773 struct inode *inode = file_inode(iocb->ki_filp); in cifs_loose_read_iter() 775 if (iocb->ki_filp->f_flags & O_DIRECT) in cifs_loose_read_iter() 776 return cifs_user_readv(iocb, iter); in cifs_loose_read_iter() 782 return generic_file_read_iter(iocb, iter); in cifs_loose_read_iter() 785 static ssize_t cifs_file_write_iter(struct kiocb *iocb, struct iov_iter *from) in cifs_file_write_iter() argument 787 struct inode *inode = file_inode(iocb->ki_filp); in cifs_file_write_iter() 792 if (iocb->ki_filp->f_flags & O_DIRECT) { in cifs_file_write_iter() 793 written = cifs_user_writev(iocb, from); in cifs_file_write_iter() 808 written = generic_file_write_iter(iocb, from); in cifs_file_write_iter()
|
/fs/jfs/ |
D | inode.c | 335 static ssize_t jfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter) in jfs_direct_IO() argument 337 struct file *file = iocb->ki_filp; in jfs_direct_IO() 343 ret = blockdev_direct_IO(iocb, inode, iter, jfs_get_block); in jfs_direct_IO() 351 loff_t end = iocb->ki_pos + count; in jfs_direct_IO()
|
/fs/f2fs/ |
D | data.c | 969 int f2fs_preallocate_blocks(struct kiocb *iocb, struct iov_iter *from) in f2fs_preallocate_blocks() argument 971 struct inode *inode = file_inode(iocb->ki_filp); in f2fs_preallocate_blocks() 975 bool direct_io = iocb->ki_flags & IOCB_DIRECT; in f2fs_preallocate_blocks() 984 if (direct_io && allow_outplace_dio(inode, iocb, from)) in f2fs_preallocate_blocks() 990 map.m_lblk = F2FS_BLK_ALIGN(iocb->ki_pos); in f2fs_preallocate_blocks() 991 map.m_len = F2FS_BYTES_TO_BLK(iocb->ki_pos + iov_iter_count(from)); in f2fs_preallocate_blocks() 1003 map.m_seg_type = f2fs_rw_hint_to_seg_type(iocb->ki_hint); in f2fs_preallocate_blocks() 1004 flag = f2fs_force_buffered_io(inode, iocb, from) ? in f2fs_preallocate_blocks() 1009 if (iocb->ki_pos + iov_iter_count(from) > MAX_INLINE_DATA(inode)) { in f2fs_preallocate_blocks() 2666 static ssize_t f2fs_direct_IO(struct kiocb *iocb, struct iov_iter *iter) in f2fs_direct_IO() argument [all …]
|