[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191021133819.GE25184@quack2.suse.cz>
Date: Mon, 21 Oct 2019 15:38:19 +0200
From: Jan Kara <jack@...e.cz>
To: mbobrowski@...browski.org
Cc: tytso@....edu, jack@...e.cz, adilger.kernel@...ger.ca,
linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org,
hch@...radead.org, david@...morbit.com, darrick.wong@...cle.com
Subject: Re: [PATCH v5 06/12] xfs: Use iomap_dio_rw_wait()
On Mon 21-10-19 20:18:27, mbobrowski@...browski.org wrote:
> Use iomap_dio_rw() to wait for unaligned direct IO instead of opencoding
> the wait.
>
> Signed-off-by: Jan Kara <jack@...e.cz>
> ---
>
> This patch has already been posted through by Jan, but I've just
> included it within this patch series to mark that it's a clear
> dependency.
This patch actually is not a dependency. But that doesn't really matter...
Honza
>
> fs/xfs/xfs_file.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
> index 0739ba72a82e..c0620135a279 100644
> --- a/fs/xfs/xfs_file.c
> +++ b/fs/xfs/xfs_file.c
> @@ -547,16 +547,12 @@ xfs_file_dio_aio_write(
> }
>
> trace_xfs_file_direct_write(ip, count, iocb->ki_pos);
> - ret = iomap_dio_rw(iocb, from, &xfs_iomap_ops, &xfs_dio_write_ops,
> - is_sync_kiocb(iocb));
> -
> /*
> - * If unaligned, this is the only IO in-flight. If it has not yet
> - * completed, wait on it before we release the iolock to prevent
> - * subsequent overlapping IO.
> + * If unaligned, this is the only IO in-flight. Wait on it before we
> + * release the iolock to prevent subsequent overlapping IO.
> */
> - if (ret == -EIOCBQUEUED && unaligned_io)
> - inode_dio_wait(inode);
> + ret = iomap_dio_rw(iocb, from, &xfs_iomap_ops, &xfs_dio_write_ops,
> + is_sync_kiocb(iocb) || unaligned_io);
> out:
> xfs_iunlock(ip, iolock);
>
> --
> 2.20.1
>
> --<M>--
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists