Lines Matching refs:iocb
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()
723 struct file *file = ia->io->iocb->ki_filp; in fuse_send_read()
982 static ssize_t fuse_cache_read_iter(struct kiocb *iocb, struct iov_iter *to) in fuse_cache_read_iter() argument
984 struct inode *inode = iocb->ki_filp->f_mapping->host; in fuse_cache_read_iter()
993 (iocb->ki_pos + iov_iter_count(to) > i_size_read(inode))) { in fuse_cache_read_iter()
995 err = fuse_update_attributes(inode, iocb->ki_filp); in fuse_cache_read_iter()
1000 return generic_file_read_iter(iocb, to); in fuse_cache_read_iter()
1025 static unsigned int fuse_write_flags(struct kiocb *iocb) in fuse_write_flags() argument
1027 unsigned int flags = iocb->ki_filp->f_flags; in fuse_write_flags()
1029 if (iocb->ki_flags & IOCB_DSYNC) in fuse_write_flags()
1031 if (iocb->ki_flags & IOCB_SYNC) in fuse_write_flags()
1040 struct kiocb *iocb = ia->io->iocb; in fuse_send_write() local
1041 struct file *file = iocb->ki_filp; in fuse_send_write()
1048 inarg->flags = fuse_write_flags(iocb); in fuse_send_write()
1082 struct kiocb *iocb, struct inode *inode, in fuse_send_write_pages() argument
1086 struct file *file = iocb->ki_filp; in fuse_send_write_pages()
1096 ia->write.in.flags = fuse_write_flags(iocb); in fuse_send_write_pages()
1195 static ssize_t fuse_perform_write(struct kiocb *iocb, in fuse_perform_write() argument
1225 err = fuse_send_write_pages(&ia, iocb, inode, in fuse_perform_write()
1250 static ssize_t fuse_cache_write_iter(struct kiocb *iocb, struct iov_iter *from) in fuse_cache_write_iter() argument
1252 struct file *file = iocb->ki_filp; in fuse_cache_write_iter()
1266 return generic_file_write_iter(iocb, from); in fuse_cache_write_iter()
1274 err = generic_write_checks(iocb, from); in fuse_cache_write_iter()
1286 if (iocb->ki_flags & IOCB_DIRECT) { in fuse_cache_write_iter()
1287 loff_t pos = iocb->ki_pos; in fuse_cache_write_iter()
1288 written = generic_file_direct_write(iocb, from); in fuse_cache_write_iter()
1294 written_buffered = fuse_perform_write(iocb, mapping, from, pos); in fuse_cache_write_iter()
1311 iocb->ki_pos = pos + written_buffered; in fuse_cache_write_iter()
1313 written = fuse_perform_write(iocb, mapping, from, iocb->ki_pos); in fuse_cache_write_iter()
1315 iocb->ki_pos += written; in fuse_cache_write_iter()
1321 written = generic_write_sync(iocb, written); in fuse_cache_write_iter()
1408 struct file *file = io->iocb->ki_filp; in fuse_direct_io()
1493 struct inode *inode = file_inode(io->iocb->ki_filp); in __fuse_direct_read()
1502 static ssize_t fuse_direct_IO(struct kiocb *iocb, struct iov_iter *iter);
1504 static ssize_t fuse_direct_read_iter(struct kiocb *iocb, struct iov_iter *to) in fuse_direct_read_iter() argument
1508 if (!is_sync_kiocb(iocb) && iocb->ki_flags & IOCB_DIRECT) { in fuse_direct_read_iter()
1509 res = fuse_direct_IO(iocb, to); in fuse_direct_read_iter()
1511 struct fuse_io_priv io = FUSE_IO_PRIV_SYNC(iocb); in fuse_direct_read_iter()
1513 res = __fuse_direct_read(&io, to, &iocb->ki_pos); in fuse_direct_read_iter()
1519 static ssize_t fuse_direct_write_iter(struct kiocb *iocb, struct iov_iter *from) in fuse_direct_write_iter() argument
1521 struct inode *inode = file_inode(iocb->ki_filp); in fuse_direct_write_iter()
1522 struct fuse_io_priv io = FUSE_IO_PRIV_SYNC(iocb); in fuse_direct_write_iter()
1527 res = generic_write_checks(iocb, from); in fuse_direct_write_iter()
1529 if (!is_sync_kiocb(iocb) && iocb->ki_flags & IOCB_DIRECT) { in fuse_direct_write_iter()
1530 res = fuse_direct_IO(iocb, from); in fuse_direct_write_iter()
1532 res = fuse_direct_io(&io, from, &iocb->ki_pos, in fuse_direct_write_iter()
1538 fuse_write_update_size(inode, iocb->ki_pos); in fuse_direct_write_iter()
1544 static ssize_t fuse_file_read_iter(struct kiocb *iocb, struct iov_iter *to) in fuse_file_read_iter() argument
1546 struct file *file = iocb->ki_filp; in fuse_file_read_iter()
1553 return fuse_cache_read_iter(iocb, to); in fuse_file_read_iter()
1555 return fuse_direct_read_iter(iocb, to); in fuse_file_read_iter()
1558 static ssize_t fuse_file_write_iter(struct kiocb *iocb, struct iov_iter *from) in fuse_file_write_iter() argument
1560 struct file *file = iocb->ki_filp; in fuse_file_write_iter()
1567 return fuse_cache_write_iter(iocb, from); in fuse_file_write_iter()
1569 return fuse_direct_write_iter(iocb, from); in fuse_file_write_iter()
3041 fuse_direct_IO(struct kiocb *iocb, struct iov_iter *iter) in fuse_direct_IO() argument
3045 struct file *file = iocb->ki_filp; in fuse_direct_IO()
3052 loff_t offset = iocb->ki_pos; in fuse_direct_IO()
3086 io->iocb = iocb; in fuse_direct_IO()
3087 io->blocking = is_sync_kiocb(iocb); in fuse_direct_IO()