Lines Matching refs:iocb

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()
77 return generic_file_read_iter(iocb, to); in ext4_file_read_iter()
160 static ssize_t ext4_write_checks(struct kiocb *iocb, struct iov_iter *from) in ext4_write_checks() argument
162 struct inode *inode = file_inode(iocb->ki_filp); in ext4_write_checks()
165 ret = generic_write_checks(iocb, from); in ext4_write_checks()
179 if (iocb->ki_pos >= sbi->s_bitmap_maxbytes) in ext4_write_checks()
181 iov_iter_truncate(from, sbi->s_bitmap_maxbytes - iocb->ki_pos); in ext4_write_checks()
188 ext4_dax_write_iter(struct kiocb *iocb, struct iov_iter *from) in ext4_dax_write_iter() argument
190 struct inode *inode = file_inode(iocb->ki_filp); in ext4_dax_write_iter()
194 if (iocb->ki_flags & IOCB_NOWAIT) in ext4_dax_write_iter()
198 ret = ext4_write_checks(iocb, from); in ext4_dax_write_iter()
201 ret = file_remove_privs(iocb->ki_filp); in ext4_dax_write_iter()
204 ret = file_update_time(iocb->ki_filp); in ext4_dax_write_iter()
208 ret = dax_iomap_rw(iocb, from, &ext4_iomap_ops); in ext4_dax_write_iter()
212 ret = generic_write_sync(iocb, ret); in ext4_dax_write_iter()
218 ext4_file_write_iter(struct kiocb *iocb, struct iov_iter *from) in ext4_file_write_iter() argument
220 struct inode *inode = file_inode(iocb->ki_filp); in ext4_file_write_iter()
221 int o_direct = iocb->ki_flags & IOCB_DIRECT; in ext4_file_write_iter()
231 return ext4_dax_write_iter(iocb, from); in ext4_file_write_iter()
235 if (iocb->ki_flags & IOCB_NOWAIT) in ext4_file_write_iter()
240 ret = ext4_write_checks(iocb, from); in ext4_file_write_iter()
250 !is_sync_kiocb(iocb) && in ext4_file_write_iter()
251 ext4_unaligned_aio(inode, from, iocb->ki_pos)) { in ext4_file_write_iter()
256 iocb->private = &overwrite; in ext4_file_write_iter()
259 if (ext4_overwrite_io(inode, iocb->ki_pos, iov_iter_count(from))) { in ext4_file_write_iter()
262 } else if (iocb->ki_flags & IOCB_NOWAIT) { in ext4_file_write_iter()
268 ret = __generic_file_write_iter(iocb, from); in ext4_file_write_iter()
279 ret = generic_write_sync(iocb, ret); in ext4_file_write_iter()