Lines Matching refs:iocb

779 					 struct kiocb *iocb,  in should_fault_in_pages()  argument
796 offs = offset_in_page(iocb->ki_pos); in should_fault_in_pages()
810 static ssize_t gfs2_file_direct_read(struct kiocb *iocb, struct iov_iter *to, in gfs2_file_direct_read() argument
813 struct file *file = iocb->ki_filp; in gfs2_file_direct_read()
846 ret = iomap_dio_rw(iocb, to, &gfs2_iomap_ops, NULL, in gfs2_file_direct_read()
856 if (should_fault_in_pages(to, iocb, &prev_count, &window_size)) { in gfs2_file_direct_read()
873 static ssize_t gfs2_file_direct_write(struct kiocb *iocb, struct iov_iter *from, in gfs2_file_direct_write() argument
876 struct file *file = iocb->ki_filp; in gfs2_file_direct_write()
908 if (iocb->ki_pos + iov_iter_count(from) > i_size_read(&ip->i_inode)) in gfs2_file_direct_write()
912 ret = iomap_dio_rw(iocb, from, &gfs2_iomap_ops, NULL, in gfs2_file_direct_write()
927 if (should_fault_in_pages(from, iocb, &prev_count, &window_size)) { in gfs2_file_direct_write()
948 static ssize_t gfs2_file_read_iter(struct kiocb *iocb, struct iov_iter *to) in gfs2_file_read_iter() argument
963 if (iocb->ki_flags & IOCB_DIRECT) in gfs2_file_read_iter()
964 return gfs2_file_direct_read(iocb, to, &gh); in gfs2_file_read_iter()
967 iocb->ki_flags |= IOCB_NOIO; in gfs2_file_read_iter()
968 ret = generic_file_read_iter(iocb, to); in gfs2_file_read_iter()
969 iocb->ki_flags &= ~IOCB_NOIO; in gfs2_file_read_iter()
978 if (iocb->ki_flags & IOCB_NOWAIT) in gfs2_file_read_iter()
981 ip = GFS2_I(iocb->ki_filp->f_mapping->host); in gfs2_file_read_iter()
988 ret = generic_file_read_iter(iocb, to); in gfs2_file_read_iter()
995 if (should_fault_in_pages(to, iocb, &prev_count, &window_size)) { in gfs2_file_read_iter()
1009 static ssize_t gfs2_file_buffered_write(struct kiocb *iocb, in gfs2_file_buffered_write() argument
1013 struct file *file = iocb->ki_filp; in gfs2_file_buffered_write()
1037 if (should_fault_in_pages(from, iocb, &prev_count, &window_size)) { in gfs2_file_buffered_write()
1060 ret = iomap_file_buffered_write(iocb, from, &gfs2_iomap_ops, NULL); in gfs2_file_buffered_write()
1072 if (should_fault_in_pages(from, iocb, &prev_count, &window_size)) { in gfs2_file_buffered_write()
1098 static ssize_t gfs2_file_write_iter(struct kiocb *iocb, struct iov_iter *from) in gfs2_file_write_iter() argument
1100 struct file *file = iocb->ki_filp; in gfs2_file_write_iter()
1106 gfs2_size_hint(file, iocb->ki_pos, iov_iter_count(from)); in gfs2_file_write_iter()
1108 if (iocb->ki_flags & IOCB_APPEND) { in gfs2_file_write_iter()
1116 ret = generic_write_checks(iocb, from); in gfs2_file_write_iter()
1124 if (iocb->ki_flags & IOCB_DIRECT) { in gfs2_file_write_iter()
1134 ret = gfs2_file_direct_write(iocb, from, &gh); in gfs2_file_write_iter()
1138 iocb->ki_flags |= IOCB_DSYNC; in gfs2_file_write_iter()
1139 buffered = gfs2_file_buffered_write(iocb, from, &gh); in gfs2_file_write_iter()
1153 ret2 = generic_write_sync(iocb, buffered); in gfs2_file_write_iter()
1155 (iocb->ki_pos - buffered) >> PAGE_SHIFT, in gfs2_file_write_iter()
1156 (iocb->ki_pos - 1) >> PAGE_SHIFT); in gfs2_file_write_iter()
1164 ret = gfs2_file_buffered_write(iocb, from, &gh); in gfs2_file_write_iter()
1166 ret = generic_write_sync(iocb, ret); in gfs2_file_write_iter()