Home
last modified time | relevance | path

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

123

/fs/ocfs2/
Daops.h63 #define ocfs2_iocb_is_rw_locked(iocb) \ argument
64 test_bit(0, (unsigned long *)&iocb->private)
65 static inline void ocfs2_iocb_set_rw_locked(struct kiocb *iocb, int level) in ocfs2_iocb_set_rw_locked() argument
67 set_bit(0, (unsigned long *)&iocb->private); in ocfs2_iocb_set_rw_locked()
69 set_bit(1, (unsigned long *)&iocb->private); in ocfs2_iocb_set_rw_locked()
71 clear_bit(1, (unsigned long *)&iocb->private); in ocfs2_iocb_set_rw_locked()
86 #define ocfs2_iocb_clear_rw_locked(iocb) \ argument
87 clear_bit(OCFS2_IOCB_RW_LOCK, (unsigned long *)&iocb->private)
88 #define ocfs2_iocb_rw_locked_level(iocb) \ argument
89 test_bit(OCFS2_IOCB_RW_LOCK_LEVEL, (unsigned long *)&iocb->private)
[all …]
Dfile.c2348 static ssize_t ocfs2_file_write_iter(struct kiocb *iocb, in ocfs2_file_write_iter() argument
2356 struct file *file = iocb->ki_filp; in ocfs2_file_write_iter()
2363 int append_write = ((iocb->ki_pos + count) >= in ocfs2_file_write_iter()
2375 appending = iocb->ki_flags & IOCB_APPEND ? 1 : 0; in ocfs2_file_write_iter()
2376 direct_io = iocb->ki_flags & IOCB_DIRECT ? 1 : 0; in ocfs2_file_write_iter()
2414 ret = generic_write_checks(iocb, from); in ocfs2_file_write_iter()
2423 ret = ocfs2_prepare_inode_for_write(file, iocb->ki_pos, count, appending, in ocfs2_file_write_iter()
2430 if (direct_io && !is_sync_kiocb(iocb)) in ocfs2_file_write_iter()
2431 unaligned_dio = ocfs2_is_io_unaligned(inode, count, iocb->ki_pos); in ocfs2_file_write_iter()
2443 iocb->ki_flags &= ~IOCB_DIRECT; in ocfs2_file_write_iter()
[all …]
Daops.c623 static void ocfs2_dio_end_io(struct kiocb *iocb, in ocfs2_dio_end_io() argument
628 struct inode *inode = file_inode(iocb->ki_filp); in ocfs2_dio_end_io()
632 BUG_ON(!ocfs2_iocb_is_rw_locked(iocb)); in ocfs2_dio_end_io()
634 if (ocfs2_iocb_is_unaligned_aio(iocb)) { in ocfs2_dio_end_io()
635 ocfs2_iocb_clear_unaligned_aio(iocb); in ocfs2_dio_end_io()
642 ocfs2_iocb_clear_rw_locked(iocb); in ocfs2_dio_end_io()
644 level = ocfs2_iocb_rw_locked_level(iocb); in ocfs2_dio_end_io()
790 static ssize_t ocfs2_direct_IO_write(struct kiocb *iocb, in ocfs2_direct_IO_write() argument
798 struct file *file = iocb->ki_filp; in ocfs2_direct_IO_write()
876 written = __blockdev_direct_IO(iocb, inode, inode->i_sb->s_bdev, iter, in ocfs2_direct_IO_write()
[all …]
/fs/
Daio.c180 struct iocb __user *ki_user_iocb; /* user's aiocb */
540 void kiocb_set_cancel_fn(struct kiocb *iocb, kiocb_cancel_fn *cancel) in kiocb_set_cancel_fn() argument
542 struct aio_kiocb *req = container_of(iocb, struct aio_kiocb, common); in kiocb_set_cancel_fn()
1083 struct aio_kiocb *iocb = container_of(kiocb, struct aio_kiocb, common); in aio_complete() local
1084 struct kioctx *ctx = iocb->ki_ctx; in aio_complete()
1099 if (iocb->ki_list.next) { in aio_complete()
1103 list_del(&iocb->ki_list); in aio_complete()
1123 event->obj = (u64)(unsigned long)iocb->ki_user_iocb; in aio_complete()
1124 event->data = iocb->ki_user_data; in aio_complete()
1132 ctx, tail, iocb, iocb->ki_user_iocb, iocb->ki_user_data, in aio_complete()
[all …]
Ddirect-io.c132 struct kiocb *iocb; /* kiocb */ member
257 dio->end_io(dio->iocb, offset, transferred, dio->private); in dio_complete()
266 err = generic_write_sync(dio->iocb->ki_filp, offset, in dio_complete()
272 dio->iocb->ki_complete(dio->iocb, ret, 0); in dio_complete()
283 dio_complete(dio, dio->iocb->ki_pos, 0, true); in dio_aio_complete_work()
312 dio_complete(dio, dio->iocb->ki_pos, 0, true); in dio_bio_end_aio()
1110 do_blockdev_direct_IO(struct kiocb *iocb, struct inode *inode, in do_blockdev_direct_IO() argument
1159 iocb->ki_filp->f_mapping; in do_blockdev_direct_IO()
1190 if (is_sync_kiocb(iocb)) in do_blockdev_direct_IO()
1206 ((iocb->ki_filp->f_flags & O_DSYNC) || in do_blockdev_direct_IO()
[all …]
Dblock_dev.c159 blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t offset) in blkdev_direct_IO() argument
161 struct file *file = iocb->ki_filp; in blkdev_direct_IO()
165 return dax_do_io(iocb, inode, iter, offset, blkdev_get_block, in blkdev_direct_IO()
167 return __blockdev_direct_IO(iocb, inode, I_BDEV(inode), iter, offset, in blkdev_direct_IO()
1647 ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from) in blkdev_write_iter() argument
1649 struct file *file = iocb->ki_filp; in blkdev_write_iter()
1661 if (iocb->ki_pos >= size) in blkdev_write_iter()
1664 iov_iter_truncate(from, size - iocb->ki_pos); in blkdev_write_iter()
1667 ret = __generic_file_write_iter(iocb, from); in blkdev_write_iter()
1670 err = generic_write_sync(file, iocb->ki_pos - ret, ret); in blkdev_write_iter()
[all …]
/fs/ceph/
Dfile.c497 static ssize_t ceph_sync_read(struct kiocb *iocb, struct iov_iter *i, in ceph_sync_read() argument
500 struct file *file = iocb->ki_filp; in ceph_sync_read()
503 u64 off = iocb->ki_pos; in ceph_sync_read()
524 if (iocb->ki_flags & IOCB_DIRECT) { in ceph_sync_read()
573 if (off > iocb->ki_pos) { in ceph_sync_read()
574 ret = off - iocb->ki_pos; in ceph_sync_read()
575 iocb->ki_pos = off; in ceph_sync_read()
623 ceph_sync_direct_write(struct kiocb *iocb, struct iov_iter *from, loff_t pos, in ceph_sync_direct_write() argument
626 struct file *file = iocb->ki_filp; in ceph_sync_direct_write()
724 iocb->ki_pos = pos; in ceph_sync_direct_write()
[all …]
/fs/nfs/
Ddirect.c79 struct kiocb * iocb; /* controlling i/o request */ member
259 ssize_t nfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t pos) in nfs_direct_IO() argument
261 struct inode *inode = iocb->ki_filp->f_mapping->host; in nfs_direct_IO()
270 return nfs_file_direct_read(iocb, iter, pos); in nfs_direct_IO()
271 return nfs_file_direct_write(iocb, iter); in nfs_direct_IO()
354 if (dreq->iocb) in nfs_direct_wait()
376 if (dreq->iocb && write) { in nfs_direct_complete()
377 loff_t pos = dreq->iocb->ki_pos + dreq->count; in nfs_direct_complete()
390 if (dreq->iocb) { in nfs_direct_complete()
394 dreq->iocb->ki_complete(dreq->iocb, res, 0); in nfs_direct_complete()
[all …]
Dfile.c161 nfs_file_read(struct kiocb *iocb, struct iov_iter *to) in nfs_file_read() argument
163 struct inode *inode = file_inode(iocb->ki_filp); in nfs_file_read()
166 if (iocb->ki_flags & IOCB_DIRECT) in nfs_file_read()
167 return nfs_file_direct_read(iocb, to, iocb->ki_pos); in nfs_file_read()
170 iocb->ki_filp, in nfs_file_read()
171 iov_iter_count(to), (unsigned long) iocb->ki_pos); in nfs_file_read()
173 result = nfs_revalidate_mapping_protected(inode, iocb->ki_filp->f_mapping); in nfs_file_read()
175 result = generic_file_read_iter(iocb, to); in nfs_file_read()
651 ssize_t nfs_file_write(struct kiocb *iocb, struct iov_iter *from) in nfs_file_write() argument
653 struct file *file = iocb->ki_filp; in nfs_file_write()
[all …]
/fs/9p/
Dvfs_file.c398 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 …]
/fs/ncpfs/
Dfile.c101 ncp_file_read_iter(struct kiocb *iocb, struct iov_iter *to) in ncp_file_read_iter() argument
103 struct file *file = iocb->ki_filp; in ncp_file_read_iter()
106 off_t pos = iocb->ki_pos; in ncp_file_read_iter()
157 iocb->ki_pos = pos; in ncp_file_read_iter()
168 ncp_file_write_iter(struct kiocb *iocb, struct iov_iter *from) in ncp_file_write_iter() argument
170 struct file *file = iocb->ki_filp; in ncp_file_write_iter()
179 errno = generic_write_checks(iocb, from); in ncp_file_write_iter()
199 pos = iocb->ki_pos; in ncp_file_write_iter()
224 iocb->ki_pos = pos; in ncp_file_write_iter()
/fs/xfs/
Dxfs_file.c288 struct kiocb *iocb, in xfs_file_read_iter() argument
291 struct file *file = iocb->ki_filp; in xfs_file_read_iter()
299 loff_t pos = iocb->ki_pos; in xfs_file_read_iter()
303 if (unlikely(iocb->ki_flags & IOCB_DIRECT)) in xfs_file_read_iter()
377 ret = generic_file_read_iter(iocb, to); in xfs_file_read_iter()
581 struct kiocb *iocb, in xfs_file_aio_write_checks() argument
585 struct file *file = iocb->ki_filp; in xfs_file_aio_write_checks()
593 error = generic_write_checks(iocb, from); in xfs_file_aio_write_checks()
624 if (iocb->ki_pos > i_size_read(inode)) { in xfs_file_aio_write_checks()
647 error = xfs_zero_eof(ip, iocb->ki_pos, i_size_read(inode), &zero); in xfs_file_aio_write_checks()
[all …]
Dxfs_aops.c1669 struct kiocb *iocb, in xfs_end_io_direct_write() argument
1674 struct inode *inode = file_inode(iocb->ki_filp); in xfs_end_io_direct_write()
1691 struct kiocb *iocb, in xfs_vm_do_dio() argument
1694 void (*endio)(struct kiocb *iocb, in xfs_vm_do_dio() argument
1703 return dax_do_io(iocb, inode, iter, offset, in xfs_vm_do_dio()
1707 return __blockdev_direct_IO(iocb, inode, bdev, iter, offset, in xfs_vm_do_dio()
1713 struct kiocb *iocb, in xfs_vm_direct_IO() argument
1717 struct inode *inode = iocb->ki_filp->f_mapping->host; in xfs_vm_direct_IO()
1720 return xfs_vm_do_dio(inode, iocb, iter, offset, in xfs_vm_direct_IO()
1722 return xfs_vm_do_dio(inode, iocb, iter, offset, NULL, 0); in xfs_vm_direct_IO()
/fs/udf/
Dfile.c102 static ssize_t udf_adinicb_direct_IO(struct kiocb *iocb, struct iov_iter *iter, in udf_adinicb_direct_IO() argument
117 static ssize_t udf_file_write_iter(struct kiocb *iocb, struct iov_iter *from) in udf_file_write_iter() argument
120 struct file *file = iocb->ki_filp; in udf_file_write_iter()
127 retval = generic_write_checks(iocb, from); in udf_file_write_iter()
133 loff_t end = iocb->ki_pos + iov_iter_count(from); in udf_file_write_iter()
150 retval = __generic_file_write_iter(iocb, from); in udf_file_write_iter()
156 err = generic_write_sync(file, iocb->ki_pos - retval, retval); in udf_file_write_iter()
/fs/sdcardfs/
Dfile.c378 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/ext4/
Dfile.c92 ext4_file_write_iter(struct kiocb *iocb, struct iov_iter *from) in ext4_file_write_iter() argument
94 struct file *file = iocb->ki_filp; in ext4_file_write_iter()
95 struct inode *inode = file_inode(iocb->ki_filp); in ext4_file_write_iter()
98 int o_direct = iocb->ki_flags & IOCB_DIRECT; in ext4_file_write_iter()
108 !is_sync_kiocb(iocb) && in ext4_file_write_iter()
109 (iocb->ki_flags & IOCB_APPEND || in ext4_file_write_iter()
110 ext4_unaligned_aio(inode, from, iocb->ki_pos))) { in ext4_file_write_iter()
117 ret = generic_write_checks(iocb, from); in ext4_file_write_iter()
128 if (iocb->ki_pos >= sbi->s_bitmap_maxbytes) { in ext4_file_write_iter()
132 iov_iter_truncate(from, sbi->s_bitmap_maxbytes - iocb->ki_pos); in ext4_file_write_iter()
[all …]
/fs/cifs/
Dcifsfs.h94 extern ssize_t cifs_user_readv(struct kiocb *iocb, struct iov_iter *to);
95 extern ssize_t cifs_strict_readv(struct kiocb *iocb, struct iov_iter *to);
96 extern ssize_t cifs_user_writev(struct kiocb *iocb, struct iov_iter *from);
97 extern ssize_t cifs_strict_writev(struct kiocb *iocb, struct iov_iter *from);
Dfile.c2621 ssize_t cifs_user_writev(struct kiocb *iocb, struct iov_iter *from) in cifs_user_writev() argument
2623 struct file *file = iocb->ki_filp; in cifs_user_writev()
2639 rc = generic_write_checks(iocb, from); in cifs_user_writev()
2653 rc = cifs_write_from_iter(iocb->ki_pos, iov_iter_count(from), from, in cifs_user_writev()
2693 wdata->offset - iocb->ki_pos); in cifs_user_writev()
2713 iocb->ki_pos += total_written; in cifs_user_writev()
2720 cifs_writev(struct kiocb *iocb, struct iov_iter *from) in cifs_writev() argument
2722 struct file *file = iocb->ki_filp; in cifs_writev()
2736 rc = generic_write_checks(iocb, from); in cifs_writev()
2740 if (!cifs_find_lock_conflict(cfile, iocb->ki_pos, iov_iter_count(from), in cifs_writev()
[all …]
Dcifsfs.c762 cifs_loose_read_iter(struct kiocb *iocb, struct iov_iter *iter) in cifs_loose_read_iter() argument
765 struct inode *inode = file_inode(iocb->ki_filp); in cifs_loose_read_iter()
771 return generic_file_read_iter(iocb, iter); in cifs_loose_read_iter()
774 static ssize_t cifs_file_write_iter(struct kiocb *iocb, struct iov_iter *from) in cifs_file_write_iter() argument
776 struct inode *inode = file_inode(iocb->ki_filp); in cifs_file_write_iter()
785 written = generic_file_write_iter(iocb, from); in cifs_file_write_iter()
/fs/coda/
Dfile.c30 coda_file_read_iter(struct kiocb *iocb, struct iov_iter *to) in coda_file_read_iter() argument
32 struct file *coda_file = iocb->ki_filp; in coda_file_read_iter()
37 return vfs_iter_read(cfi->cfi_container, to, &iocb->ki_pos); in coda_file_read_iter()
62 coda_file_write_iter(struct kiocb *iocb, struct iov_iter *to) in coda_file_write_iter() argument
64 struct file *coda_file = iocb->ki_filp; in coda_file_write_iter()
75 ret = vfs_iter_write(cfi->cfi_container, to, &iocb->ki_pos); in coda_file_write_iter()
/fs/fuse/
Dfile.c597 bool is_sync = is_sync_kiocb(io->iocb); in fuse_aio_complete()
615 struct inode *inode = file_inode(io->iocb->ki_filp); in fuse_aio_complete()
624 io->iocb->ki_complete(io->iocb, res, 0); in fuse_aio_complete()
937 static ssize_t fuse_file_read_iter(struct kiocb *iocb, struct iov_iter *to) in fuse_file_read_iter() argument
939 struct inode *inode = iocb->ki_filp->f_mapping->host; in fuse_file_read_iter()
948 (iocb->ki_pos + iov_iter_count(to) > i_size_read(inode))) { in fuse_file_read_iter()
950 err = fuse_update_attributes(inode, NULL, iocb->ki_filp, NULL); in fuse_file_read_iter()
955 return generic_file_read_iter(iocb, to); in fuse_file_read_iter()
1184 static ssize_t fuse_file_write_iter(struct kiocb *iocb, struct iov_iter *from) in fuse_file_write_iter() argument
1186 struct file *file = iocb->ki_filp; in fuse_file_write_iter()
[all …]
/fs/jfs/
Dinode.c335 static ssize_t jfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, in jfs_direct_IO() argument
338 struct file *file = iocb->ki_filp; in jfs_direct_IO()
344 ret = blockdev_direct_IO(iocb, inode, iter, offset, jfs_get_block); in jfs_direct_IO()
/fs/ecryptfs/
Dfile.c46 static ssize_t ecryptfs_read_update_atime(struct kiocb *iocb, in ecryptfs_read_update_atime() argument
51 struct file *file = iocb->ki_filp; in ecryptfs_read_update_atime()
53 rc = generic_file_read_iter(iocb, to); in ecryptfs_read_update_atime()
/fs/ntfs/
Dfile.c331 static ssize_t ntfs_prepare_file_for_write(struct kiocb *iocb, in ntfs_prepare_file_for_write() argument
338 struct file *file = iocb->ki_filp; in ntfs_prepare_file_for_write()
346 (unsigned long long)iocb->ki_pos, in ntfs_prepare_file_for_write()
348 err = generic_write_checks(iocb, from); in ntfs_prepare_file_for_write()
393 pos = iocb->ki_pos; in ntfs_prepare_file_for_write()
1940 static ssize_t ntfs_file_write_iter(struct kiocb *iocb, struct iov_iter *from) in ntfs_file_write_iter() argument
1942 struct file *file = iocb->ki_filp; in ntfs_file_write_iter()
1950 err = ntfs_prepare_file_for_write(iocb, from); in ntfs_file_write_iter()
1952 written = ntfs_perform_write(file, from, iocb->ki_pos); in ntfs_file_write_iter()
1956 err = generic_write_sync(file, iocb->ki_pos, written); in ntfs_file_write_iter()
[all …]
/fs/f2fs/
Ddata.c902 int f2fs_preallocate_blocks(struct kiocb *iocb, struct iov_iter *from) in f2fs_preallocate_blocks() argument
904 struct inode *inode = file_inode(iocb->ki_filp); in f2fs_preallocate_blocks()
908 bool direct_io = iocb->ki_flags & IOCB_DIRECT; in f2fs_preallocate_blocks()
920 map.m_lblk = F2FS_BLK_ALIGN(iocb->ki_pos); in f2fs_preallocate_blocks()
921 map.m_len = F2FS_BYTES_TO_BLK(iocb->ki_pos + iov_iter_count(from)); in f2fs_preallocate_blocks()
932 map.m_seg_type = rw_hint_to_seg_type(iocb->ki_hint); in f2fs_preallocate_blocks()
938 if (iocb->ki_pos + iov_iter_count(from) > MAX_INLINE_DATA(inode)) { in f2fs_preallocate_blocks()
2394 static ssize_t f2fs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, in f2fs_direct_IO() argument
2397 struct address_space *mapping = iocb->ki_filp->f_mapping; in f2fs_direct_IO()
2403 enum rw_hint hint = iocb->ki_hint; in f2fs_direct_IO()
[all …]

123