Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: hare@suse.de (Hannes Reinecke)
Subject: [PATCH 1/2] nvme: add Kconfig option 'NVME_MULTIPATH_DEFAULT'
Date: Fri, 10 Nov 2017 10:58:22 +0100	[thread overview]
Message-ID: <1510307903-3346-2-git-send-email-hare@suse.de> (raw)
In-Reply-To: <1510307903-3346-1-git-send-email-hare@suse.de>

Add a configuration option to enable or disable NVMe multipath
per default.

Signed-off-by: Hannes Reinecke <hare at suse.com>
---
 drivers/nvme/host/Kconfig     | 11 +++++++++++
 drivers/nvme/host/multipath.c |  8 +++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/host/Kconfig b/drivers/nvme/host/Kconfig
index 4588680..cc0cbab 100644
--- a/drivers/nvme/host/Kconfig
+++ b/drivers/nvme/host/Kconfig
@@ -22,6 +22,17 @@ config NVME_MULTIPATH
 	   /dev/nvneXnY device will show up for each NVMe namespaces,
 	   even if it is accessible through multiple controllers.
 
+config NVME_MULTIPATH_DEFAULT
+       bool "NVMe multipath support enabled by default"
+       depends on NVME_MULTIPATH
+	default y
+       ---help---
+          This option enables multipath access to NVMe subsystems
+	  per default. It can be overridden with the boot/module option
+	  nvme_core.multipath later on.
+
+	  If unsure say Y.
+
 config NVME_FABRICS
 	tristate
 
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index 8502758..9ceef3e 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -14,7 +14,13 @@
 #include <linux/moduleparam.h>
 #include "nvme.h"
 
-static bool multipath = true;
+#ifdef CONFIG_NVME_MULTIPATH_DEFAULT
+#define NVME_MULTIPATH_DEFAULT true
+#else
+#define NVME_MULTIPATH_DEFAULT false
+#endif
+
+static bool multipath = NVME_MULTIPATH_DEFAULT;
 module_param(multipath, bool, 0644);
 MODULE_PARM_DESC(multipath,
 	"turn on native support for multiple controllers per subsystem");
-- 
1.8.5.6

  reply	other threads:[~2017-11-10  9:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-10  9:58 [PATCH 0/2] Two small follow-up patches for nvme multipathing Hannes Reinecke
2017-11-10  9:58 ` Hannes Reinecke [this message]
2017-11-10 11:13   ` [PATCH 1/2] nvme: add Kconfig option 'NVME_MULTIPATH_DEFAULT' Christoph Hellwig
2017-11-10 12:21     ` Hannes Reinecke
2017-11-10  9:58 ` [PATCH 2/2] nvme: expose subsys attribute to sysfs Hannes Reinecke
2017-11-10 11:14   ` Christoph Hellwig
2017-11-13 21:25   ` Sagi Grimberg

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=1510307903-3346-2-git-send-email-hare@suse.de \
    --to=hare@suse.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