[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250228032541.369804-5-jmeneghi@redhat.com>
Date: Thu, 27 Feb 2025 22:25:41 -0500
From: John Meneghini <jmeneghi@...hat.com>
To: kbusch@...nel.org,
hch@....de,
sagi@...mberg.me
Cc: loberman@...hat.com,
linux-nvme@...ts.infradead.org,
linux-kernel@...r.kernel.org,
emilne@...hat.com,
jmeneghi@...hat.com,
bgurney@...hat.com
Subject: [PATCH 4/4] nvme: add mulitipath warning to nvme_alloc_ns
When CONFIG_NVME_MULTIPATH is disabled, add a warning if
we discover a multipath enabled controller with an attached
shared namespace.
Signed-off-by: John Meneghini <jmeneghi@...hat.com>
---
drivers/nvme/host/core.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index c2b7e6834535..465069c0f6a8 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3938,6 +3938,15 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, struct nvme_ns_info *info)
} else {
sprintf(disk->disk_name, "nvme%dn%d", ctrl->instance,
ns->head->instance);
+#ifndef CONFIG_NVME_MULTIPATH
+ if ((ctrl->subsys->cmic & NVME_CTRL_CMIC_MULTI_CTRL) && info->is_shared) {
+ dev_warn(ctrl->device,
+ "Found shared namespace %d but multipathing not supported.\n",
+ info->nsid);
+ dev_warn_once(ctrl->device,
+ "Shared namespace support requires CONFIG_NVME_MULTIPATH.\n");
+ }
+#endif
}
if (nvme_update_ns_info(ns, info))
--
2.48.1
Powered by blists - more mailing lists