[PATCH v2] Do not require atomic writes to be power of 2 sized and aligned on length boundary

Keith Busch kbusch at kernel.org
Sun Dec 21 15:17:15 PST 2025


On Sun, Dec 21, 2025 at 04:24:02PM +0300, Vitaliy Filippov wrote:
> It contradicts NVMe specification where alignment is only required when atomic
> write boundary (NABSPF/NABO) is set and highly limits usage of NVMe atomic writes

Commit header is missing the "fs:" prefix, and the commit log should
wrap at 72 characters.

On the techincal side, this is a generic function used by multiple
protocols, so you can't just appeal to NVMe to justify removing the
checks.

NVMe still has atomic boundaries where straddling it fails to be an
atomic operation. Instead of removing the checks, you'd have to replace
it with a more costly operation if you really want to support more
arbitrary write lengths and offsets. And if you do manage to remove the
power of two requirement, then the queue limit for nvme's
atomic_write_hw_unit_max isn't correct anymore.



More information about the Linux-nvme mailing list