Do we need an opt-in for file systems use of hw atomic writes?
Christoph Hellwig
hch at lst.de
Tue Jul 15 04:29:52 PDT 2025
On Tue, Jul 15, 2025 at 12:02:06PM +0200, Christian Brauner wrote:
> > 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.
>
> If we were to make this a mount option it would be really really ugly.
> Either it is a filesystem specific mount option and then we have the
> problem that we're ending up with different mount option names
> per-filesystem.
Not that I'm arguing for a mount option (this should be sticky), but
we've had plenty of fs parsed mount options with common semantics.
> 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.
The block layer just passes things through.
More information about the Linux-nvme
mailing list