]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
nvme: warn when finding multi-port subsystems without multipathing enabled
authorChristoph Hellwig <hch@lst.de>
Tue, 20 Nov 2018 15:57:54 +0000 (16:57 +0100)
committerSultan Alsawaf <sultan.alsawaf@canonical.com>
Wed, 24 Jul 2019 15:45:11 +0000 (09:45 -0600)
BugLink: https://bugs.launchpad.net/bugs/1837161
[ Upstream commit 14a1336e6fff47dd1028b484d6c802105c58e2ee ]

Without CONFIG_NVME_MULTIPATH enabled a multi-port subsystem might
show up as invididual devices and cause problems, warn about it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/nvme/host/nvme.h

index 32417432563873fc0494b098679f98fe2b0fc729..9fa97d79159a46f3e963a3a84ec04c76b0b81193 100644 (file)
@@ -499,6 +499,9 @@ static inline int nvme_nvm_register(struct nvme_ns *ns, char *disk_name,
 static inline void nvme_nvm_unregister(struct nvme_ns *ns) {};
 static inline int nvme_nvm_register_sysfs(struct nvme_ns *ns)
 {
+       if (ctrl->subsys->cmic & (1 << 3))
+               dev_warn(ctrl->device,
+"Please enable CONFIG_NVME_MULTIPATH for full support of multi-port devices.\n");
        return 0;
 }
 static inline void nvme_nvm_unregister_sysfs(struct nvme_ns *ns) {};