All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Dave Chinner <david@fromorbit.com>,
	hch@lst.de, Christian Brauner <brauner@kernel.org>,
	"Darrick J. Wong" <djwong@kernel.org>, Jan Kara <jack@suse.cz>
Cc: 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 01:50:46 -0500	[thread overview]
Message-ID: <20231207065046.GA9663@mit.edu> (raw)
In-Reply-To: <20180301014144.28892-1-david@fromorbit.com>

On Thu, Mar 01, 2018 at 12:41:44PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> If we are doing direct IO writes with datasync semantics, we often
> have to flush metadata changes along with the data write. However,
> if we are overwriting existing data, there are no metadata changes
> that we need to flush. In this case, optimising the IO by using
> FUA write makes sense.
> 
> We know from teh IOMAP_F_DIRTY flag as to whether a specific inode
> requires a metadata flush - this is currently used by DAX to ensure
> extent modi$fication as stable in page fault operations. For direct
> IO writes, we can use it to determine if we need to flush metadata
> or not once the data is on disk.

Hi,

I've gotten an inquiry from some engineers at Microsoft who would
really like it if ext4 could use FUA writes when doing O_DSYNC writes,
since this is soemthing that SQL Server uses.  In the discussion for
this patch series back in 2018[1], ext4 hadn't yet converted over to
iomap for Direct I/O, and so adding this feature for ext4 wasn't
really practical.

[1] https://lore.kernel.org/all/20180319160650.mavedzwienzgwgqi@quack2.suse.cz/

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?

Many thanks!

						- Ted

  parent reply	other threads:[~2023-12-07  6:51 UTC|newest]

Thread overview: 29+ 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-24 15:32                         ` Nikolay Borisov
2018-04-25 22:28                       ` Jan Kara
2023-12-07  6:50 ` Theodore Ts'o [this message]
2023-12-07  7:32   ` Christoph Hellwig
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=20231207065046.GA9663@mit.edu \
    --to=tytso@mit.edu \
    --cc=brauner@kernel.org \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.