From: Christoph Hellwig <hch@lst.de>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Dave Chinner <david@fromorbit.com>,
hch@lst.de, Christian Brauner <brauner@kernel.org>,
"Darrick J. Wong" <djwong@kernel.org>, Jan Kara <jack@suse.cz>,
linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] [RFC] iomap: Use FUA for pure data O_DSYNC DIO writes
Date: Thu, 7 Dec 2023 08:32:32 +0100 [thread overview]
Message-ID: <20231207073232.GA18798@lst.de> (raw)
In-Reply-To: <20231207065046.GA9663@mit.edu>
On Thu, Dec 07, 2023 at 01:50:46AM -0500, Theodore Ts'o wrote:
> Today, ext4 does use iomap for DIO, but an experiment seems to
> indicate that something hasn't been wired up to enable FUA for O_DSYNC
> writes. I've looked at fs/iomap/direct-io.c and it wasn't immediately
> obvious what I need to add to enable this feature.
>
> I was wondering if you could me some quick hints about what and where
> I should be looking?
There isn't really anything strange going on. First your device needs to
support it. For NVMe the feature is mandatory, but we still disable it
globally for SATA, and second you need to remember FUA only makes sense
for O_DSYNC-style writes, not O_SYNC that also writes out the inode.
Then you need to make sure neither IOMAP_F_SHARED nor IOMAP_F_DIRTY
is set on the iomap. IOMAP_F_SHARED is never set by ext4, so if none
of the above is the culprit I'd loke into if IOMAP_F_DIRTY and up
beeing set for your test I/O.
next prev parent reply other threads:[~2023-12-07 7:32 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-01 1:41 [PATCH] [RFC] iomap: Use FUA for pure data O_DSYNC DIO writes Dave Chinner
2018-03-02 17:05 ` Darrick J. Wong
2018-03-02 22:20 ` Christoph Hellwig
2018-03-02 22:26 ` Christoph Hellwig
2018-03-04 23:00 ` Dave Chinner
2018-03-05 15:11 ` Christoph Hellwig
2018-03-02 22:53 ` Dave Chinner
2018-03-02 22:59 ` Christoph Hellwig
2018-03-02 23:00 ` Christoph Hellwig
2018-03-02 23:15 ` Dave Chinner
2018-03-02 23:21 ` Christoph Hellwig
2018-03-12 23:53 ` Dan Williams
2018-03-13 0:15 ` Robert Dorr
2018-03-13 5:10 ` Dave Chinner
2018-03-13 16:00 ` Robert Dorr
2018-03-13 16:12 ` Christoph Hellwig
2018-03-13 18:52 ` Robert Dorr
2018-03-19 16:06 ` Jan Kara
2018-03-19 16:14 ` Robert Dorr
2018-03-21 23:52 ` Robert Dorr
2018-03-22 14:35 ` Jan Kara
2018-03-22 14:38 ` Robert Dorr
2018-04-24 14:09 ` Robert Dorr
2018-04-24 15:32 ` Nikolay Borisov
2018-04-25 22:28 ` Jan Kara
2023-12-07 6:50 ` Theodore Ts'o
2023-12-07 7:32 ` Christoph Hellwig [this message]
2023-12-07 23:03 ` Dave Chinner
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=20231207073232.GA18798@lst.de \
--to=hch@lst.de \
--cc=brauner@kernel.org \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=tytso@mit.edu \
/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).