Do we need an opt-in for file systems use of hw atomic writes?
Christoph Hellwig
hch at lst.de
Mon Jul 14 23:02:47 PDT 2025
On Mon, Jul 14, 2025 at 04:53:49PM +0100, John Garry wrote:
> 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.
I'm not sure a XFLAG is all that useful. It's not really a per-file
persistent thing. It's more of a mount option, or better persistent
mount-option attr like we did for autofsck.
>
> 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).
Yes. There's some ways to emulate power fail for file system level
power fail testing using dm-log-writes and similar, but that doesn't
help at all with testing the power fail behavior of the device which
we rely on here.
More information about the Linux-nvme
mailing list