[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250322232848.225140-3-jmeneghi@redhat.com>
Date: Sat, 22 Mar 2025 19:28:47 -0400
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 v2 2/3] nvme-multipath: add the NVME_MULTIPATH_PARAM config option
The new CONFIG_NVME_MULTIPATH_PARAM option controls the core_nvme.multipath
parameter. When CONFIG_NVME_MULTIPATH_PARAM=n the multipath parameter is
removed from the kernel and nvme multipathing is permanently enabled.
When NVME_MULTIPATH_PARAM=y the nvme multipath parameter is added to the
kernel and nvme multipath support is controlled by the
core_nvme.multipath parameter.
By default CONFIG_NVME_MULTIPATH_PARAM=y
Signed-off-by: John Meneghini <jmeneghi@...hat.com>
Tested-by: John Meneghini <jmeneghi@...hat.com>
Reviewed-by: Bryan Gurney <bgurney@...hat.com>
---
drivers/nvme/host/Kconfig | 13 +++++++++++++
drivers/nvme/host/multipath.c | 3 ++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/Kconfig b/drivers/nvme/host/Kconfig
index d47dfa80fb95..c8458b10c83f 100644
--- a/drivers/nvme/host/Kconfig
+++ b/drivers/nvme/host/Kconfig
@@ -28,6 +28,19 @@ config NVME_MULTIPATH
If unsure, say Y.
+config NVME_MULTIPATH_PARAM
+ bool "NVMe multipath param"
+ depends on NVME_CORE && NVME_MULTIPATH
+ default y
+ help
+ This option controls the inclusion of the NVMe core module
+ "multipath" parameter. If this option is disabled the
+ nvme_core.multipath parameter is excluded from the kernel.
+ If this option is enabled the nvme_core.multipath parameter
+ is included in the kernel.
+
+ If unsure, say Y.
+
config NVME_VERBOSE_ERRORS
bool "NVMe verbose error reporting"
depends on NVME_CORE
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index 6b12ca80aa27..cad76de2830a 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -10,10 +10,11 @@
#include "nvme.h"
bool multipath = true;
+#ifdef CONFIG_NVME_MULTIPATH_PARAM
module_param(multipath, bool, 0444);
MODULE_PARM_DESC(multipath,
"turn on native support for multiple controllers per subsystem");
-
+#endif
static const char *nvme_iopolicy_names[] = {
[NVME_IOPOLICY_NUMA] = "numa",
[NVME_IOPOLICY_RR] = "round-robin",
--
2.48.1
Powered by blists - more mailing lists