• Home
  • Raw
  • Download

Lines Matching refs:iocb

219 	struct kiocb		*iocb,  in xfs_file_dio_aio_read()  argument
222 struct xfs_inode *ip = XFS_I(file_inode(iocb->ki_filp)); in xfs_file_dio_aio_read()
226 trace_xfs_file_direct_read(ip, count, iocb->ki_pos); in xfs_file_dio_aio_read()
231 file_accessed(iocb->ki_filp); in xfs_file_dio_aio_read()
233 if (iocb->ki_flags & IOCB_NOWAIT) { in xfs_file_dio_aio_read()
239 ret = iomap_dio_rw(iocb, to, &xfs_read_iomap_ops, NULL, in xfs_file_dio_aio_read()
240 is_sync_kiocb(iocb)); in xfs_file_dio_aio_read()
248 struct kiocb *iocb, in xfs_file_dax_read() argument
251 struct xfs_inode *ip = XFS_I(iocb->ki_filp->f_mapping->host); in xfs_file_dax_read()
255 trace_xfs_file_dax_read(ip, count, iocb->ki_pos); in xfs_file_dax_read()
260 if (iocb->ki_flags & IOCB_NOWAIT) { in xfs_file_dax_read()
267 ret = dax_iomap_rw(iocb, to, &xfs_read_iomap_ops); in xfs_file_dax_read()
270 file_accessed(iocb->ki_filp); in xfs_file_dax_read()
276 struct kiocb *iocb, in xfs_file_buffered_aio_read() argument
279 struct xfs_inode *ip = XFS_I(file_inode(iocb->ki_filp)); in xfs_file_buffered_aio_read()
282 trace_xfs_file_buffered_read(ip, iov_iter_count(to), iocb->ki_pos); in xfs_file_buffered_aio_read()
284 if (iocb->ki_flags & IOCB_NOWAIT) { in xfs_file_buffered_aio_read()
290 ret = generic_file_read_iter(iocb, to); in xfs_file_buffered_aio_read()
298 struct kiocb *iocb, in xfs_file_read_iter() argument
301 struct inode *inode = file_inode(iocb->ki_filp); in xfs_file_read_iter()
311 ret = xfs_file_dax_read(iocb, to); in xfs_file_read_iter()
312 else if (iocb->ki_flags & IOCB_DIRECT) in xfs_file_read_iter()
313 ret = xfs_file_dio_aio_read(iocb, to); in xfs_file_read_iter()
315 ret = xfs_file_buffered_aio_read(iocb, to); in xfs_file_read_iter()
331 struct kiocb *iocb, in xfs_file_aio_write_checks() argument
335 struct file *file = iocb->ki_filp; in xfs_file_aio_write_checks()
344 error = generic_write_checks(iocb, from); in xfs_file_aio_write_checks()
379 if (iocb->ki_pos > isize) { in xfs_file_aio_write_checks()
401 trace_xfs_zero_eof(ip, isize, iocb->ki_pos - isize); in xfs_file_aio_write_checks()
402 error = iomap_zero_range(inode, isize, iocb->ki_pos - isize, in xfs_file_aio_write_checks()
420 struct kiocb *iocb, in xfs_dio_write_end_io() argument
425 struct inode *inode = file_inode(iocb->ki_filp); in xfs_dio_write_end_io()
427 loff_t offset = iocb->ki_pos; in xfs_dio_write_end_io()
526 struct kiocb *iocb, in xfs_file_dio_aio_write() argument
529 struct file *file = iocb->ki_filp; in xfs_file_dio_aio_write()
541 if ((iocb->ki_pos | count) & target->bt_logical_sectormask) in xfs_file_dio_aio_write()
551 if ((iocb->ki_pos & mp->m_blockmask) || in xfs_file_dio_aio_write()
552 ((iocb->ki_pos + count) & mp->m_blockmask)) { in xfs_file_dio_aio_write()
560 trace_xfs_reflink_bounce_dio_write(ip, iocb->ki_pos, count); in xfs_file_dio_aio_write()
568 if (iocb->ki_flags & IOCB_NOWAIT) { in xfs_file_dio_aio_write()
578 ret = xfs_file_aio_write_checks(iocb, from, &iolock); in xfs_file_dio_aio_write()
597 trace_xfs_file_direct_write(ip, count, iocb->ki_pos); in xfs_file_dio_aio_write()
602 ret = iomap_dio_rw(iocb, from, &xfs_direct_write_iomap_ops, in xfs_file_dio_aio_write()
604 is_sync_kiocb(iocb) || unaligned_io); in xfs_file_dio_aio_write()
618 struct kiocb *iocb, in xfs_file_dax_write() argument
621 struct inode *inode = iocb->ki_filp->f_mapping->host; in xfs_file_dax_write()
628 if (iocb->ki_flags & IOCB_NOWAIT) { in xfs_file_dax_write()
635 ret = xfs_file_aio_write_checks(iocb, from, &iolock); in xfs_file_dax_write()
639 pos = iocb->ki_pos; in xfs_file_dax_write()
643 ret = dax_iomap_rw(iocb, from, &xfs_direct_write_iomap_ops); in xfs_file_dax_write()
644 if (ret > 0 && iocb->ki_pos > i_size_read(inode)) { in xfs_file_dax_write()
645 i_size_write(inode, iocb->ki_pos); in xfs_file_dax_write()
657 ret = generic_write_sync(iocb, ret); in xfs_file_dax_write()
664 struct kiocb *iocb, in xfs_file_buffered_aio_write() argument
667 struct file *file = iocb->ki_filp; in xfs_file_buffered_aio_write()
675 if (iocb->ki_flags & IOCB_NOWAIT) in xfs_file_buffered_aio_write()
682 ret = xfs_file_aio_write_checks(iocb, from, &iolock); in xfs_file_buffered_aio_write()
689 trace_xfs_file_buffered_write(ip, iov_iter_count(from), iocb->ki_pos); in xfs_file_buffered_aio_write()
690 ret = iomap_file_buffered_write(iocb, from, in xfs_file_buffered_aio_write()
693 iocb->ki_pos += ret; in xfs_file_buffered_aio_write()
734 ret = generic_write_sync(iocb, ret); in xfs_file_buffered_aio_write()
741 struct kiocb *iocb, in xfs_file_write_iter() argument
744 struct file *file = iocb->ki_filp; in xfs_file_write_iter()
760 return xfs_file_dax_write(iocb, from); in xfs_file_write_iter()
762 if (iocb->ki_flags & IOCB_DIRECT) { in xfs_file_write_iter()
769 ret = xfs_file_dio_aio_write(iocb, from); in xfs_file_write_iter()
774 return xfs_file_buffered_aio_write(iocb, from); in xfs_file_write_iter()