• Home
  • Raw
  • Download

Lines Matching refs:iocb

785 static ssize_t gfs2_file_direct_read(struct kiocb *iocb, struct iov_iter *to,  in gfs2_file_direct_read()  argument
788 struct file *file = iocb->ki_filp; in gfs2_file_direct_read()
801 ret = iomap_dio_rw(iocb, to, &gfs2_iomap_ops, NULL, in gfs2_file_direct_read()
802 is_sync_kiocb(iocb)); in gfs2_file_direct_read()
810 static ssize_t gfs2_file_direct_write(struct kiocb *iocb, struct iov_iter *from, in gfs2_file_direct_write() argument
813 struct file *file = iocb->ki_filp; in gfs2_file_direct_write()
817 loff_t offset = iocb->ki_pos; in gfs2_file_direct_write()
837 ret = iomap_dio_rw(iocb, from, &gfs2_iomap_ops, NULL, in gfs2_file_direct_write()
838 is_sync_kiocb(iocb)); in gfs2_file_direct_write()
848 static ssize_t gfs2_file_read_iter(struct kiocb *iocb, struct iov_iter *to) in gfs2_file_read_iter() argument
855 if (iocb->ki_flags & IOCB_DIRECT) { in gfs2_file_read_iter()
856 ret = gfs2_file_direct_read(iocb, to, &gh); in gfs2_file_read_iter()
859 iocb->ki_flags &= ~IOCB_DIRECT; in gfs2_file_read_iter()
862 iocb->ki_flags |= IOCB_NOIO; in gfs2_file_read_iter()
863 ret = generic_file_read_iter(iocb, to); in gfs2_file_read_iter()
864 iocb->ki_flags &= ~IOCB_NOIO; in gfs2_file_read_iter()
873 if (iocb->ki_flags & IOCB_NOWAIT) in gfs2_file_read_iter()
876 ip = GFS2_I(iocb->ki_filp->f_mapping->host); in gfs2_file_read_iter()
881 ret = generic_file_read_iter(iocb, to); in gfs2_file_read_iter()
902 static ssize_t gfs2_file_write_iter(struct kiocb *iocb, struct iov_iter *from) in gfs2_file_write_iter() argument
904 struct file *file = iocb->ki_filp; in gfs2_file_write_iter()
910 gfs2_size_hint(file, iocb->ki_pos, iov_iter_count(from)); in gfs2_file_write_iter()
912 if (iocb->ki_flags & IOCB_APPEND) { in gfs2_file_write_iter()
920 ret = generic_write_checks(iocb, from); in gfs2_file_write_iter()
932 if (iocb->ki_flags & IOCB_DIRECT) { in gfs2_file_write_iter()
936 ret = gfs2_file_direct_write(iocb, from, &gh); in gfs2_file_write_iter()
940 iocb->ki_flags |= IOCB_DSYNC; in gfs2_file_write_iter()
942 buffered = iomap_file_buffered_write(iocb, from, &gfs2_iomap_ops); in gfs2_file_write_iter()
957 iocb->ki_pos += buffered; in gfs2_file_write_iter()
958 ret2 = generic_write_sync(iocb, buffered); in gfs2_file_write_iter()
960 (iocb->ki_pos - buffered) >> PAGE_SHIFT, in gfs2_file_write_iter()
961 (iocb->ki_pos - 1) >> PAGE_SHIFT); in gfs2_file_write_iter()
966 ret = iomap_file_buffered_write(iocb, from, &gfs2_iomap_ops); in gfs2_file_write_iter()
969 iocb->ki_pos += ret; in gfs2_file_write_iter()
970 ret = generic_write_sync(iocb, ret); in gfs2_file_write_iter()