From: "Darrick J. Wong" <djwong@kernel.org>
To: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
Jan Kara <jack@suse.cz>, Christoph Hellwig <hch@infradead.org>,
Ojaswin Mujoo <ojaswin@linux.ibm.com>,
Disha Goel <disgoel@linux.ibm.com>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCHv6 8/9] iomap: Remove IOMAP_DIO_NOSYNC unused dio flag
Date: Fri, 21 Apr 2023 08:56:16 -0700 [thread overview]
Message-ID: <20230421155616.GJ360881@frogsfrogsfrogs> (raw)
In-Reply-To: <744d0e54ec73f38c8d61a3e4cf8fd030b2c1a8cf.1682069716.git.ritesh.list@gmail.com>
On Fri, Apr 21, 2023 at 03:16:18PM +0530, Ritesh Harjani (IBM) wrote:
> IOMAP_DIO_NOSYNC earlier was added for use in btrfs. But it seems for
> aio dsync writes this is not useful anyway. For aio dsync case, we
> we queue the request and return -EIOCBQUEUED. Now, since IOMAP_DIO_NOSYNC
> doesn't let iomap_dio_complete() to call generic_write_sync(),
> hence we may lose the sync write.
>
> Hence kill this flag as it is not in use by any FS now.
>
> Tested-by: Disha Goel <disgoel@linux.ibm.com>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Darrick J. Wong <djwong@kernel.org>
> Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> fs/iomap/direct-io.c | 2 +-
> include/linux/iomap.h | 6 ------
> 2 files changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
> index f771001574d0..36ab1152dbea 100644
> --- a/fs/iomap/direct-io.c
> +++ b/fs/iomap/direct-io.c
> @@ -541,7 +541,7 @@ __iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter,
> }
>
> /* for data sync or sync, we need sync completion processing */
> - if (iocb_is_dsync(iocb) && !(dio_flags & IOMAP_DIO_NOSYNC)) {
> + if (iocb_is_dsync(iocb)) {
> dio->flags |= IOMAP_DIO_NEED_SYNC;
>
> /*
> diff --git a/include/linux/iomap.h b/include/linux/iomap.h
> index 0f8123504e5e..e2b836c2e119 100644
> --- a/include/linux/iomap.h
> +++ b/include/linux/iomap.h
> @@ -377,12 +377,6 @@ struct iomap_dio_ops {
> */
> #define IOMAP_DIO_PARTIAL (1 << 2)
>
> -/*
> - * The caller will sync the write if needed; do not sync it within
> - * iomap_dio_rw. Overrides IOMAP_DIO_FORCE_WAIT.
> - */
> -#define IOMAP_DIO_NOSYNC (1 << 3)
> -
> ssize_t iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter,
> const struct iomap_ops *ops, const struct iomap_dio_ops *dops,
> unsigned int dio_flags, void *private, size_t done_before);
> --
> 2.39.2
>
next prev parent reply other threads:[~2023-04-21 15:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-21 9:46 [PATCHv6 0/9] ext2: DIO to use iomap Ritesh Harjani (IBM)
2023-04-21 9:46 ` [PATCHv6 1/9] ext2/dax: Fix ext2_setsize when len is page aligned Ritesh Harjani (IBM)
2023-04-21 9:46 ` [PATCHv6 2/9] fs/buffer.c: Add generic_buffers_fsync*() implementation Ritesh Harjani (IBM)
2023-04-21 9:46 ` [PATCHv6 3/9] ext4: Use generic_buffers_fsync_noflush() implementation Ritesh Harjani (IBM)
2023-04-21 9:46 ` [PATCHv6 4/9] ext2: Use generic_buffers_fsync() implementation Ritesh Harjani (IBM)
2023-04-21 9:46 ` [PATCHv6 5/9] ext2: Move direct-io to use iomap Ritesh Harjani (IBM)
2023-04-21 9:46 ` [PATCHv6 6/9] fs.h: Add TRACE_IOCB_STRINGS for use in trace points Ritesh Harjani (IBM)
2023-04-21 15:56 ` Darrick J. Wong
2023-04-21 9:46 ` [PATCHv6 7/9] ext2: Add direct-io " Ritesh Harjani (IBM)
2023-04-21 9:46 ` [PATCHv6 8/9] iomap: Remove IOMAP_DIO_NOSYNC unused dio flag Ritesh Harjani (IBM)
2023-04-21 15:56 ` Darrick J. Wong [this message]
2023-04-21 9:46 ` [PATCHv6 9/9] iomap: Add DIO tracepoints Ritesh Harjani (IBM)
2023-04-21 15:56 ` Darrick J. Wong
2023-04-21 11:23 ` [PATCHv6 0/9] ext2: DIO to use iomap Jan Kara
2023-04-21 12:05 ` Ritesh Harjani
2023-04-21 15:40 ` Darrick J. Wong
2023-04-24 9:43 ` Jan Kara
2023-04-24 9:44 ` Jan Kara
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=20230421155616.GJ360881@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=disgoel@linux.ibm.com \
--cc=hch@infradead.org \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=ojaswin@linux.ibm.com \
--cc=ritesh.list@gmail.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