Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH 2/3] nvme: warn when finding multi-port subsystems without multipathing enabled
Date: Tue, 20 Nov 2018 17:27:33 +0100	[thread overview]
Message-ID: <20181120162734.2013-3-hch@lst.de> (raw)
In-Reply-To: <20181120162734.2013-1-hch@lst.de>

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 at lst.de>
---
 drivers/nvme/host/nvme.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 27663ce3044e..f2594d468f29 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -534,6 +534,9 @@ static inline void nvme_mpath_check_last_path(struct nvme_ns *ns)
 static inline int nvme_mpath_init(struct nvme_ctrl *ctrl,
 		struct nvme_id_ctrl *id)
 {
+	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_mpath_uninit(struct nvme_ctrl *ctrl)
-- 
2.19.1

  parent reply	other threads:[~2018-11-20 16:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-20 16:27 tweak multipath kconfig and options Christoph Hellwig
2018-11-20 16:27 ` [PATCH 1/3] nvme: enable multipathing by default Christoph Hellwig
2018-11-20 18:47   ` Keith Busch
2018-11-21  8:27     ` Christoph Hellwig
2018-11-22  2:44       ` Sagi Grimberg
2018-11-26 15:40         ` Keith Busch
2018-11-20 16:27 ` Christoph Hellwig [this message]
2018-11-22  2:45   ` [PATCH 2/3] nvme: warn when finding multi-port subsystems without multipathing enabled Sagi Grimberg
2018-11-20 16:27 ` [PATCH 3/3] nvme: deprecate the multipath=0 module option Christoph Hellwig
2018-11-22  2:49   ` Sagi Grimberg
2018-11-27 15:06     ` [PATCH 3/3 v2] " Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181120162734.2013-3-hch@lst.de \
    --to=hch@lst.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox