[PATCH 2/2] nvme: all namespaces in a subsystem must adhere to a common atomic write size

Christoph Hellwig hch at lst.de
Tue May 6 23:46:46 PDT 2025


On Tue, May 06, 2025 at 08:57:35AM -0700, alan.adamson at oracle.com wrote:
>
> On 5/1/25 11:52 PM, Christoph Hellwig wrote:
>> On Wed, Apr 30, 2025 at 10:18:30AM -0700, Alan Adamson wrote:
>>> The first namespace that is configured in a subsystem will define the
>>> subsystem's atomic write size.  This will be based on either AWUPF or
>>> NAWUPF. Configuring subsequent namespaces in the subsystem requires its
>>> atomic write size as defined by its AWUPF or NAWUPF to match the
>>> subsystem's atomic write size. If a namespace doesn't adhere to the
>>> subsystem's atomic write size, its atomic queue limits will be based on an
>>> atomic write size of 512 bytes and an error message will be logged.
>
> Along with the error message, we are setting atomic_write_max_bytes to 512b 
> which will at least allow the device to still be used.

But that means you change the limit when later adding a new path for
a namespace, and file systems do not expect it to change underneath
them.  This is especially fatal because nvme will not even fail
writes not fitting into the atomic boundary.

So we can't do anything but reject adding the new controller if the
limit is smaller than the existing limit.




More information about the Linux-nvme mailing list