]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nvme: revert the cross-controller atomic write size validation
authorChristoph Hellwig <hch@lst.de>
Wed, 9 Jul 2025 09:54:08 +0000 (11:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 24 Jul 2025 06:58:35 +0000 (08:58 +0200)
commit6a1473d09c8cdc22d27f1789765a1d04de1cb175
treefb3b76e826d274306902ba042d9b686032d9f79f
parent75e1b2079ef0653a2f7aa69be515d86b7faf1908
nvme: revert the cross-controller atomic write size validation

[ Upstream commit 1fc09f2961f5c6d8bb53bc989f17b12fdc6bc93d ]

This was originally added by commit 8695f060a029 ("nvme: all namespaces
in a subsystem must adhere to a common atomic write size") to check
the all controllers in a subsystem report the same atomic write size,
but the check wasn't quite correct and caused problems for devices
with multiple namespaces that report different LBA sizes.  Commit
f46d273449ba ("nvme: fix atomic write size validation") tried to fix
this, but then caused problems for namespace rediscovery after a
format with an LBA size change that changes the AWUPF value.

This drops the validation and essentially reverts those two commits while
keeping the cleanup that went in between the two.  We'll need to figure
out how to properly check for the mouse trap that nvme left us, but for
now revert the check to keep devices working for users who couldn't care
less about the atomic write feature.

Fixes: 8695f060a029 ("nvme: all namespaces in a subsystem must adhere to a common atomic write size")
Fixes: f46d273449ba ("nvme: fix atomic write size validation")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alan Adamson <alan.adamson@oracle.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Tested-by: Alan Adamson <alan.adamson@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/core.c