All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] multipath-tools: disable foreign libraries by default
@ 2020-05-08 19:33 mwilck
  2020-05-08 19:33 ` [PATCH 1/2] libmultipath: set "enable_foreign" to NONE " mwilck
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: mwilck @ 2020-05-08 19:33 UTC (permalink / raw)
  To: Christophe Varoqui, Benjamin Marzinski
  Cc: George, Martin, dm-devel, Martin Wilck

From: Martin Wilck <mwilck@suse.com>

Hi Christophe,

This is a follow-up to the previous discussion with topic 'RFC:
multipath-tools: NVMe native multipath and default setting for
"enable_foreign"'. Upon Netapp's initiative, I'd asked for foreign
libraries to be disabled by default. Ben had replied he'd agree,
and suggested implementing a "-e" option for multipath to enable
all foreign libraries:

https://www.redhat.com/archives/dm-devel/2020-February/msg00271.html

This patch set implements this idea.

Regards,
Martin


Martin Wilck (2):
  libmultipath: set "enable_foreign" to NONE by default
  multipath: add "-e" option to enable foreign libraries

 libmultipath/defaults.h    |  4 ++--
 multipath/main.c           | 11 ++++++++++-
 multipath/multipath.8      |  6 ++++++
 multipath/multipath.conf.5 |  5 +++--
 4 files changed, 21 insertions(+), 5 deletions(-)

-- 
2.26.2

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] libmultipath: set "enable_foreign" to NONE by default
  2020-05-08 19:33 [PATCH 0/2] multipath-tools: disable foreign libraries by default mwilck
@ 2020-05-08 19:33 ` mwilck
  2020-05-08 19:33 ` [PATCH 2/2] multipath: add "-e" option to enable foreign libraries mwilck
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: mwilck @ 2020-05-08 19:33 UTC (permalink / raw)
  To: Christophe Varoqui, Benjamin Marzinski
  Cc: George, Martin, dm-devel, Martin Wilck

From: Martin Wilck <mwilck@suse.com>

This has been requested by NetApp.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 libmultipath/defaults.h    | 4 ++--
 multipath/multipath.conf.5 | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h
index e5ee6afe..01a501bd 100644
--- a/libmultipath/defaults.h
+++ b/libmultipath/defaults.h
@@ -50,8 +50,8 @@
 #define DEFAULT_FIND_MULTIPATHS_TIMEOUT -10
 #define DEFAULT_UNKNOWN_FIND_MULTIPATHS_TIMEOUT 1
 #define DEFAULT_ALL_TG_PT ALL_TG_PT_OFF
-/* Enable all foreign libraries by default */
-#define DEFAULT_ENABLE_FOREIGN ""
+/* Enable no foreign libraries by default */
+#define DEFAULT_ENABLE_FOREIGN "NONE"
 
 #define CHECKINT_UNDEF		UINT_MAX
 #define DEFAULT_CHECKINT	5
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
index 05a5e8ff..28cea88c 100644
--- a/multipath/multipath.conf.5
+++ b/multipath/multipath.conf.5
@@ -1228,10 +1228,11 @@ Enables or disables foreign libraries (see section
 .I FOREIGN MULTIPATH SUPPORT
 below). The value is a regular expression; foreign libraries are loaded
 if their name (e.g. \(dqnvme\(dq) matches the expression. By default,
-all foreign libraries are enabled.
+no foreign libraries are enabled. Set this to \(dqnvme\(dq to enable NVMe native
+multipath support, or \(dq.*\(dq to enable all foreign libraries.
 .RS
 .TP
-The default is: \fB\(dq\(dq\fR (the empty regular expression)
+The default is: \fB\(dqNONE\(dq\fR
 .RE
 .
 .
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] multipath: add "-e" option to enable foreign libraries
  2020-05-08 19:33 [PATCH 0/2] multipath-tools: disable foreign libraries by default mwilck
  2020-05-08 19:33 ` [PATCH 1/2] libmultipath: set "enable_foreign" to NONE " mwilck
@ 2020-05-08 19:33 ` mwilck
  2020-06-08 20:00 ` [PATCH 0/2] multipath-tools: disable foreign libraries by default Martin Wilck
  2020-06-09 20:00 ` Benjamin Marzinski
  3 siblings, 0 replies; 5+ messages in thread
From: mwilck @ 2020-05-08 19:33 UTC (permalink / raw)
  To: Christophe Varoqui, Benjamin Marzinski
  Cc: George, Martin, dm-devel, Martin Wilck

From: Martin Wilck <mwilck@suse.com>

As we have set "enable_foreign" to "NONE" now by default, users
may find it useful to be able to switch on foreign multipath display
with an extra command line option even if foreign libraries are
not enabled in multipath.conf. Currently this makes only sense
with "multipath -ll", as the nvme library (and foreign libraries
in general) support only the display of status information.

Suggested-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 multipath/main.c      | 11 ++++++++++-
 multipath/multipath.8 |  6 ++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/multipath/main.c b/multipath/main.c
index cf9d2a28..af9d757a 100644
--- a/multipath/main.c
+++ b/multipath/main.c
@@ -148,6 +148,7 @@ usage (char * progname)
 		"  -h      print this usage text\n"
 		"  -l      show multipath topology (sysfs and DM info)\n"
 		"  -ll     show multipath topology (maximum info)\n"
+		"  -e      enable foreign libraries with -l/-ll\n"
 		"  -f      flush a multipath device map\n"
 		"  -F      flush all multipath device maps\n"
 		"  -a      add a device wwid to the wwids file\n"
@@ -898,6 +899,7 @@ main (int argc, char *argv[])
 	char *dev = NULL;
 	struct config *conf;
 	int retries = -1;
+	bool enable_foreign = false;
 
 	udev = udev_new();
 	logsink = 0;
@@ -907,7 +909,7 @@ main (int argc, char *argv[])
 	multipath_conf = conf;
 	conf->retrigger_tries = 0;
 	conf->force_sync = 1;
-	while ((arg = getopt(argc, argv, ":adcChl::FfM:v:p:b:BrR:itTquUwW")) != EOF ) {
+	while ((arg = getopt(argc, argv, ":adcChl::eFfM:v:p:b:BrR:itTquUwW")) != EOF ) {
 		switch(arg) {
 		case 1: printf("optarg : %s\n",optarg);
 			break;
@@ -1000,6 +1002,9 @@ main (int argc, char *argv[])
 		case 'R':
 			retries = atoi(optarg);
 			break;
+		case 'e':
+			enable_foreign = true;
+			break;
 		case ':':
 			fprintf(stderr, "Missing option argument\n");
 			usage(argv[0]);
@@ -1051,6 +1056,10 @@ main (int argc, char *argv[])
 		condlog(0, "failed to initialize prioritizers");
 		goto out;
 	}
+
+	if ((cmd == CMD_LIST_SHORT || cmd == CMD_LIST_LONG) && enable_foreign)
+		conf->enable_foreign = "";
+
 	/* Failing here is non-fatal */
 	init_foreign(conf->multipath_dir, conf->enable_foreign);
 	if (cmd == CMD_USABLE_PATHS) {
diff --git a/multipath/multipath.8 b/multipath/multipath.8
index 9cdd05a3..6fb8645a 100644
--- a/multipath/multipath.8
+++ b/multipath/multipath.8
@@ -223,6 +223,12 @@ The verbosity level also controls the level of log and debug messages printed to
 Dry run, do not create or update devmaps.
 .
 .TP
+.B \-e
+Enable all foreign libraries. This overrides the
+.I enable_foreign 
+option from \fBmultipath.conf(5)\fR.
+.
+.TP
 .B \-i
 Ignore WWIDs file when processing devices. If
 \fIfind_multipaths strict\fR or \fIfind_multipaths no\fR is set in
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] multipath-tools: disable foreign libraries by default
  2020-05-08 19:33 [PATCH 0/2] multipath-tools: disable foreign libraries by default mwilck
  2020-05-08 19:33 ` [PATCH 1/2] libmultipath: set "enable_foreign" to NONE " mwilck
  2020-05-08 19:33 ` [PATCH 2/2] multipath: add "-e" option to enable foreign libraries mwilck
@ 2020-06-08 20:00 ` Martin Wilck
  2020-06-09 20:00 ` Benjamin Marzinski
  3 siblings, 0 replies; 5+ messages in thread
From: Martin Wilck @ 2020-06-08 20:00 UTC (permalink / raw)
  To: Christophe Varoqui, Benjamin Marzinski; +Cc: George, Martin, dm-devel

Hi Ben,

On Fri, 2020-05-08 at 21:33 +0200, mwilck@suse.com wrote:
> From: Martin Wilck <mwilck@suse.com>
> 
> Hi Christophe,
> 
> This is a follow-up to the previous discussion with topic 'RFC:
> multipath-tools: NVMe native multipath and default setting for
> "enable_foreign"'. Upon Netapp's initiative, I'd asked for foreign
> libraries to be disabled by default. Ben had replied he'd agree,
> and suggested implementing a "-e" option for multipath to enable
> all foreign libraries:
> 
> https://www.redhat.com/archives/dm-devel/2020-February/msg00271.html
> 
> This patch set implements this idea.
> 
> Regards,
> Martin
> 
> 
> Martin Wilck (2):
>   libmultipath: set "enable_foreign" to NONE by default
>   multipath: add "-e" option to enable foreign libraries
> 
>  libmultipath/defaults.h    |  4 ++--
>  multipath/main.c           | 11 ++++++++++-
>  multipath/multipath.8      |  6 ++++++
>  multipath/multipath.conf.5 |  5 +++--
>  4 files changed, 21 insertions(+), 5 deletions(-)
> 

this series got no reply from you. Did you miss the post, perhaps?

Thanks,
Martin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] multipath-tools: disable foreign libraries by default
  2020-05-08 19:33 [PATCH 0/2] multipath-tools: disable foreign libraries by default mwilck
                   ` (2 preceding siblings ...)
  2020-06-08 20:00 ` [PATCH 0/2] multipath-tools: disable foreign libraries by default Martin Wilck
@ 2020-06-09 20:00 ` Benjamin Marzinski
  3 siblings, 0 replies; 5+ messages in thread
From: Benjamin Marzinski @ 2020-06-09 20:00 UTC (permalink / raw)
  To: mwilck; +Cc: dm-devel, George, Martin

On Fri, May 08, 2020 at 09:33:00PM +0200, mwilck@suse.com wrote:
> From: Martin Wilck <mwilck@suse.com>
> 
> Hi Christophe,
> 
> This is a follow-up to the previous discussion with topic 'RFC:
> multipath-tools: NVMe native multipath and default setting for
> "enable_foreign"'. Upon Netapp's initiative, I'd asked for foreign
> libraries to be disabled by default. Ben had replied he'd agree,
> and suggested implementing a "-e" option for multipath to enable
> all foreign libraries:
> 
> https://www.redhat.com/archives/dm-devel/2020-February/msg00271.html
> 
> This patch set implements this idea.
> 

Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>

For the set.

> Regards,
> Martin
> 
> 
> Martin Wilck (2):
>   libmultipath: set "enable_foreign" to NONE by default
>   multipath: add "-e" option to enable foreign libraries
> 
>  libmultipath/defaults.h    |  4 ++--
>  multipath/main.c           | 11 ++++++++++-
>  multipath/multipath.8      |  6 ++++++
>  multipath/multipath.conf.5 |  5 +++--
>  4 files changed, 21 insertions(+), 5 deletions(-)
> 
> -- 
> 2.26.2

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-06-09 20:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08 19:33 [PATCH 0/2] multipath-tools: disable foreign libraries by default mwilck
2020-05-08 19:33 ` [PATCH 1/2] libmultipath: set "enable_foreign" to NONE " mwilck
2020-05-08 19:33 ` [PATCH 2/2] multipath: add "-e" option to enable foreign libraries mwilck
2020-06-08 20:00 ` [PATCH 0/2] multipath-tools: disable foreign libraries by default Martin Wilck
2020-06-09 20:00 ` Benjamin Marzinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.