Skip to content

Commit 1fc09f2

Browse files
author
Christoph Hellwig
committed
nvme: revert the cross-controller atomic write size validation
This was originally added by commit 8695f06 ("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 f46d273 ("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: 8695f06 ("nvme: all namespaces in a subsystem must adhere to a common atomic write size") Fixes: f46d273 ("nvme: fix atomic write size validation") Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Alan Adamson <[email protected]> Reviewed-by: Keith Busch <[email protected]> Reviewed-by: John Garry <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Tested-by: Alan Adamson <[email protected]>
1 parent dd8e34a commit 1fc09f2

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

drivers/nvme/host/core.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3537,15 +3537,6 @@ static int nvme_init_identify(struct nvme_ctrl *ctrl)
35373537
if (ret)
35383538
goto out_free;
35393539
}
3540-
3541-
if (le16_to_cpu(id->awupf) != ctrl->subsys->awupf) {
3542-
dev_err_ratelimited(ctrl->device,
3543-
"inconsistent AWUPF, controller not added (%u/%u).\n",
3544-
le16_to_cpu(id->awupf), ctrl->subsys->awupf);
3545-
ret = -EINVAL;
3546-
goto out_free;
3547-
}
3548-
35493540
memcpy(ctrl->subsys->firmware_rev, id->fr,
35503541
sizeof(ctrl->subsys->firmware_rev));
35513542

0 commit comments

Comments
 (0)