From: John Garry <john.g.garry@oracle.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Christoph Hellwig <hch@lst.de>,
"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: Mon, 14 Jul 2025 16:53:49 +0100 [thread overview]
Message-ID: <6babdebb-45d1-4f33-b8b5-6b1c4e381e35@oracle.com> (raw)
In-Reply-To: <aHULEGt3d0niAz2e@infradead.org>
On 14/07/2025 14:50, Christoph Hellwig wrote:
> On Mon, Jul 14, 2025 at 02:39:54PM +0100, John Garry wrote:
>> On 14/07/2025 14:17, Christoph Hellwig wrote:
>>> Hi all,
>>>
>>> I'm currently trying to sort out the nvme atomics limits mess, and
>>> between that, the lack of a atomic write command in nvme, and the
>>> overall degrading quality of cheap consumer nvme devices I'm starting
>>> to free really uneasy about XFS using hardware atomics by default without
>>> an explicit opt-in, as broken atomics implementations will lead to
>>> really subtle data corruption.
>>>
>>> Is is just me, or would it be a good idea to require an explicit
>>> opt-in to user hardware atomics?
>>
>> But isn't this just an NVMe issue? I would assume that we would look at such
>> an option in the NVMe driver (to opt in when we are concerned about the
>> implementation), and not the FS. SCSI is ok AFAIK.
>
> SCSI is a better standard, and modulo USB devices doesn't have as much
> of an issue with cheap consumer devices.
>
> But form the file system POV we've spent the last decade or so hardening
> file systems against hardware failures, so now suddenly using such a
> high risk feature automatically feels a bit odd.
>
I see. I figure that something like a FS_XFLAG could be used for that.
But we should still protect bdev fops users as well.
JFYI, I have done a good bit of HW and SW-based atomic powerfail testing
with fio on a Linux dev board, so there is a decent method available for
users to verify their HW atomics. But then testing power failures is not
always practical. Crashing the kernel only tests AWUN, and AWUPF (for NVMe).
next prev parent reply other threads:[~2025-07-14 15:54 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 [this message]
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
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=6babdebb-45d1-4f33-b8b5-6b1c4e381e35@oracle.com \
--to=john.g.garry@oracle.com \
--cc=djwong@kernel.org \
--cc=hch@infradead.org \
--cc=hch@lst.de \
--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).