From: "Theodore Ts'o" <tytso@mit.edu>
To: Christian Brauner <brauner@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>,
John Garry <john.g.garry@oracle.com>,
Christoph Hellwig <hch@infradead.org>,
"Darrick J. Wong" <djwong@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org,
linux-block@vger.kernel.org, linux-nvme@lists.infradead.org
Subject: Re: Do we need an opt-in for file systems use of hw atomic writes?
Date: Tue, 15 Jul 2025 07:58:57 -0400 [thread overview]
Message-ID: <20250715115857.GB74698@mit.edu> (raw)
In-Reply-To: <20250715-rundreise-resignieren-34550a8d92e3@brauner>
On Tue, Jul 15, 2025 at 12:02:06PM +0200, Christian Brauner wrote:
>
> It feels like this is something that needs to be done on the block
> layer. IOW, maybe add generic block layer ioctls or a per-device sysfs
> entry that allows to turn atomic writes on or off. That information
> would then also potentially available to the filesystem to e.g.,
> generate an info message during mount that hardware atomics are used or
> aren't used. Because ultimately the block layer is where the decision
> needs to be made.
I'd really like it if we can edit the atomic write granularity by
writing to the sysfs file to make it easier to test the atomic write
codepaths in the file system.
So I'd suggest combining this with John Garry's suggestion to allow
atomic writes by default on NVMe devices that report NAWUPF, not to
ignore AWUPF. If system admistrators need to make atomic writes on
legacy devices that only report AWUPF, they can manually set the
atomic write granulairty. And if they screw up --- well, that's on
them.
And file system developers who don't care about data safety on power
failure (which we can't directly test via fstests anyway), but just
want to test the code paths, we can manually write to the sysfs file
as well.
Cheers,
- Ted
next prev parent reply other threads:[~2025-07-15 11:59 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-14 13:17 Do we need an opt-in for file systems use of hw atomic writes? Christoph Hellwig
2025-07-14 13:24 ` Theodore Ts'o
2025-07-14 13:30 ` Christoph Hellwig
2025-07-14 16:04 ` Darrick J. Wong
2025-07-15 6:00 ` Christoph Hellwig
2025-07-15 3:22 ` Martin K. Petersen
2025-07-15 6:00 ` Christoph Hellwig
2025-07-15 12:45 ` Martin K. Petersen
2025-07-14 13:39 ` John Garry
2025-07-14 13:50 ` Christoph Hellwig
2025-07-14 15:53 ` John Garry
2025-07-15 6:02 ` Christoph Hellwig
2025-07-15 8:42 ` John Garry
2025-07-15 9:03 ` Christoph Hellwig
2025-08-19 11:42 ` John Garry
2025-08-19 13:39 ` Christoph Hellwig
2025-08-19 14:36 ` John Garry
2025-08-19 14:43 ` Darrick J. Wong
2025-08-19 14:45 ` Christoph Hellwig
2025-08-21 14:01 ` Keith Busch
2025-07-15 10:02 ` Christian Brauner
2025-07-15 11:29 ` Christoph Hellwig
2025-07-15 12:20 ` Christian Brauner
2025-07-15 11:58 ` Theodore Ts'o [this message]
2025-07-14 20:53 ` Dave Chinner
2025-07-15 6:05 ` Christoph Hellwig
2025-07-15 20:56 ` Keith Busch
2025-07-16 5:50 ` Nilay Shroff
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=20250715115857.GB74698@mit.edu \
--to=tytso@mit.edu \
--cc=brauner@kernel.org \
--cc=djwong@kernel.org \
--cc=hch@infradead.org \
--cc=hch@lst.de \
--cc=john.g.garry@oracle.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-xfs@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 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).