fix atomic limits check
Christoph Hellwig
hch at lst.de
Tue Jun 24 06:10:56 PDT 2025
Arrg, the patch did not actually print NAWUPF, and made me scramble
really hard how the output could be possible. New one below:
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 3da5ac71a9b0..90473d4770f5 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2033,6 +2033,8 @@ static u32 nvme_configure_atomic_write(struct nvme_ns *ns,
atomic_bs = (1 + le16_to_cpu(id->nawupf)) * bs;
if (id->nabspf)
boundary = (le16_to_cpu(id->nabspf) + 1) * bs;
+ dev_info(ns->ctrl->device, "nsid %u: NAWUPF: %u, atomic_bs: %u\n",
+ ns->head->ns_id, le16_to_cpu(id->nawupf), atomic_bs);
} else {
/*
* Use the controller wide atomic write unit. This sucks
@@ -2042,6 +2044,8 @@ static u32 nvme_configure_atomic_write(struct nvme_ns *ns,
* values for different controllers in the subsystem.
*/
atomic_bs = (1 + ns->ctrl->subsys->awupf) * bs;
+ dev_info(ns->ctrl->device, "nsid: %u: AWUPF: %u, atomic_bs: %u\n",
+ ns->head->ns_id, ns->ctrl->subsys->awupf, atomic_bs);
}
lim->atomic_write_hw_max = atomic_bs;
More information about the Linux-nvme
mailing list