]> www.infradead.org Git - nvme.git/commit
nvme: fix atomic write size validation nvme-6.16
authorChristoph Hellwig <hch@lst.de>
Wed, 11 Jun 2025 04:54:56 +0000 (06:54 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 18 Jun 2025 05:33:56 +0000 (07:33 +0200)
commit563b5394838edf8d17bb57d7b51016549c441983
treed0270bf340068ffcae3d6e8e48869a723986933a
parent9f866b19b983c7874b46bbe5cdd11077ec8353c0
nvme: fix atomic write size validation

Don't mix the namespace and controller values, and validate the
per-controller limit when probing the controller.  This avoid spurious
failures for controllers with namespaces that have different namespaces
with different logical block sizes, or report the per-namespace values
only for some namespaces.

It also fixes a missing queue_limits_cancel_update in an error path by
removing that error path.

Fixes: 8695f060a029 ("nvme: all namespaces in a subsystem must adhere to a common atomic write size")
Reported-by: Yi Zhang <yi.zhang@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Tested-by: Yi Zhang <yi.zhang@redhat.com>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h