linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com,
	linux-ext4@vger.kernel.org, ocfs2-devel@oss.oracle.com,
	darrick.wong@oracle.com
Subject: Re: [PATCH 3/3] xfs: fold xfs_vm_do_dio into xfs_vm_direct_IO
Date: Wed, 3 Feb 2016 08:52:20 -0500	[thread overview]
Message-ID: <20160203135220.GD20211@bfoster.bfoster> (raw)
In-Reply-To: <1454444257-9086-4-git-send-email-hch@lst.de>

On Tue, Feb 02, 2016 at 09:17:37PM +0100, Christoph Hellwig wrote:
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  fs/xfs/xfs_aops.c | 39 ++++++++++++++-------------------------
>  1 file changed, 14 insertions(+), 25 deletions(-)
> 
> diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
> index f6b08ea..e3cb7f8 100644
> --- a/fs/xfs/xfs_aops.c
> +++ b/fs/xfs/xfs_aops.c
> @@ -1599,41 +1599,30 @@ xfs_end_io_direct_write(
>  	}
>  }
>  
> -static inline ssize_t
> -xfs_vm_do_dio(
> -	struct inode		*inode,
> +STATIC ssize_t
> +xfs_vm_direct_IO(
>  	struct kiocb		*iocb,
>  	struct iov_iter		*iter,
> -	loff_t			offset,
> -	void			(*endio)(struct kiocb	*iocb,
> -					 loff_t		offset,
> -					 ssize_t	size,
> -					 void		*private),
> -	int			flags)
> +	loff_t			offset)
>  {
> +	struct inode		*inode = iocb->ki_filp->f_mapping->host;
> +	dio_iodone_t		*endio = NULL;
> +	int			flags = 0;
>  	struct block_device	*bdev;
>  
> -	if (IS_DAX(inode))
> +	if (iov_iter_rw(iter) == WRITE) {
> +		endio = xfs_end_io_direct_write;
> +		flags = DIO_ASYNC_EXTEND;
> +	}
> +
> +	if (IS_DAX(inode)) {
>  		return dax_do_io(iocb, inode, iter, offset,
>  				 xfs_get_blocks_direct, endio, 0);
> +	}
>  
>  	bdev = xfs_find_bdev_for_inode(inode);
>  	return  __blockdev_direct_IO(iocb, inode, bdev, iter, offset,
> -				     xfs_get_blocks_direct, endio, NULL, flags);
> -}
> -
> -STATIC ssize_t
> -xfs_vm_direct_IO(
> -	struct kiocb		*iocb,
> -	struct iov_iter		*iter,
> -	loff_t			offset)
> -{
> -	struct inode		*inode = iocb->ki_filp->f_mapping->host;
> -
> -	if (iov_iter_rw(iter) == WRITE)
> -		return xfs_vm_do_dio(inode, iocb, iter, offset,
> -				     xfs_end_io_direct_write, DIO_ASYNC_EXTEND);
> -	return xfs_vm_do_dio(inode, iocb, iter, offset, NULL, 0);
> +			xfs_get_blocks_direct, endio, NULL, flags);
>  }
>  
>  /*
> -- 
> 2.1.4
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2016-02-03 13:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02 20:17 VFS/XFS: directio updates to ease COW handling Christoph Hellwig
2016-02-02 20:17 ` [PATCH 1/3] direct-io: always call ->end_io if non-NULL Christoph Hellwig
2016-02-03  0:05   ` Darrick J. Wong
2016-02-03 15:48     ` Christoph Hellwig
2016-02-02 20:17 ` [PATCH 2/3] xfs: don't use ioends for direct write completions Christoph Hellwig
2016-02-03 13:52   ` Brian Foster
2016-02-02 20:17 ` [PATCH 3/3] xfs: fold xfs_vm_do_dio into xfs_vm_direct_IO Christoph Hellwig
2016-02-03 13:52   ` Brian Foster [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-02-03 18:40 vfs/xfs: directio updates to ease COW handling V2 Christoph Hellwig
2016-02-03 18:40 ` [PATCH 3/3] xfs: fold xfs_vm_do_dio into xfs_vm_direct_IO Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160203135220.GD20211@bfoster.bfoster \
    --to=bfoster@redhat.com \
    --cc=darrick.wong@oracle.com \
    --cc=hch@lst.de \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=ocfs2-devel@oss.oracle.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).