[PATCH v2 2/2] nvme: zns: include zone index in invalid zone type error

From: Xixin Liu

Date: Thu Jun 25 2026 - 21:00:16 EST


Include the zone index when reporting an invalid zone type during zone
descriptor parsing.

Signed-off-by: Xixin Liu <liuxixin@xxxxxxxxxx>
---
drivers/nvme/host/zns.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/host/zns.c b/drivers/nvme/host/zns.c
index 8ed1b6a33454..b2c3d4e5f6a7 100644
--- a/drivers/nvme/host/zns.c
+++ b/drivers/nvme/host/zns.c
@@ -155,7 +155,8 @@ static int nvme_zone_parse_entry(struct nvme_ns *ns,
struct blk_zone zone = { };

if ((entry->zt & 0xf) != NVME_ZONE_TYPE_SEQWRITE_REQ) {
- dev_err(ns->ctrl->device, "invalid zone type %#x\n", entry->zt);
+ dev_err(ns->ctrl->device, "invalid zone type %#x at zone %u\n",
+ entry->zt, idx);
return -EINVAL;
}

--
2.43.0