Re: [PATCH] fs: remove power of 2 and length boundary atomic write restrictions
From: Vitaliy Filippov <hidden>
Date: 2026-01-07 16:21:44
Also in:
linux-fsdevel, linux-nvme
From: Vitaliy Filippov <hidden>
Date: 2026-01-07 16:21:44
Also in:
linux-fsdevel, linux-nvme
Note that the alignment rule is not just for atomic HW boundaries. We also support atomic writes on stacked devices, where this is relevant - specifically striped devices, like raid0. Doing an unaligned atomic write on a striped device may result in trying to issue an atomic write which straddles 2x separate devices, which would obviously be broken.
Ok, then I'd also add atomic boundary checks and atomic_write_boundary_bytes = stripe size to /sys/block/**/queue for md devices. Not 2^N and length-alignment checks, just the boundary.
It seems that you just want to take advantage of the block layer code to handle submission of an atomic write bio, i.e. reject anything which cannot be atomically written. In essence, that would be to just set REQ_ATOMIC. Maybe that could be done as a passthrough command, I'm not sure.
Of course. I thought it was the whole point of RWF_ATOMIC - REQ_ATOMIC for userspace. I don't want passthrough commands, I want to use normal kernel I/O.