Skip to contentSkip to conversation

nvme: show subsys nqn for duplicate cntlids

PATCH Applied Keith Busch 3 participants 3 messages Nov 29, 2021 – Dec 6, 2021 NVMe

lore
Share & tools
lore

Keith Busch

author maintainer
#0 lore raw

PATCH 1/1 nvme: show subsys nqn for duplicate cntlids

The driver assigned nvme handle isn't persistent across reboots, so is not enough information to match up where the collisions are occuring. Add the subsys nqn string to the output so that it can more easily be identified later.

---
 drivers/nvme/host/core.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/nvme/host/core.c +3 -2
index 47a941207058..96db941c01b5 100644
@@ -2684,8 +2684,9 @@ static bool nvme_validate_cntlid(struct nvme_subsystem *subsys,
 
 		if (tmp->cntlid == ctrl->cntlid) {
 			dev_err(ctrl->device,
-				"Duplicate cntlid %u with %s, rejecting\n",
-				ctrl->cntlid, dev_name(tmp->device));
+				"Duplicate cntlid %u with %s, subsys %s, rejecting\n",
+				ctrl->cntlid, dev_name(tmp->device),
+				subsys->subnqn);
 			return false;
 		}
 
Signature · 1 line
2.25.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Keith Busch

The driver assigned nvme handle isn't persistent across reboots, so is not enough information to match up where the collisions are occuring.

's/occuring/occurring/' above ?

Quoted 5 lines

Add the subsys nqn string to the output so that it can more easily be identified later.

Looks good.