2b0cd7cceb
Rebased on top of Martin Wilck's queue of ACKed upstream commits * https://github.com/openSUSE/multipath-tools/tree/upstream-queue * All previous patches have been reordered, with the exception of 0011-libdmmp-Add-support-for-upcoming-json-c-0.14.0.patch which has been replaced with 0029-fix-boolean-value-with-json-c-0.14.patch Modify 0054-RH-add-mpathconf.patch * remove default enable_foreign and property blacklist_exceptions settings, and deal with the builtin default change from 0031-libmultipath-set-enable_foreign-to-NONE-by-default.patch. Fixes bz #1853668 Add 0048-Makefile.inc-trim-extra-information-from-systemd-ver.patch Add 0049-kpartx-fix-Wsign-compare-error.patch * The above two patches have been submitted upstream
64 lines
1.8 KiB
Diff
64 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
Date: Thu, 2 Jul 2020 19:07:06 -0500
|
|
Subject: [PATCH] multipath: add option to skip multipathd delegation
|
|
|
|
Add the -D option to allow users to skip delegating commands to
|
|
multipathd.
|
|
|
|
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
---
|
|
libmultipath/config.h | 1 +
|
|
multipath/main.c | 8 +++++++-
|
|
2 files changed, 8 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/libmultipath/config.h b/libmultipath/config.h
|
|
index 55569360..92c61a0d 100644
|
|
--- a/libmultipath/config.h
|
|
+++ b/libmultipath/config.h
|
|
@@ -190,6 +190,7 @@ struct config {
|
|
int ghost_delay;
|
|
int find_multipaths_timeout;
|
|
int marginal_pathgroups;
|
|
+ int skip_delegate;
|
|
unsigned int version[3];
|
|
unsigned int sequence_nr;
|
|
|
|
diff --git a/multipath/main.c b/multipath/main.c
|
|
index 6a24e483..4c43314e 100644
|
|
--- a/multipath/main.c
|
|
+++ b/multipath/main.c
|
|
@@ -817,6 +817,9 @@ int delegate_to_multipathd(enum mpath_cmds cmd,
|
|
*p = '\0';
|
|
n = sizeof(command);
|
|
|
|
+ if (conf->skip_delegate)
|
|
+ return NOT_DELEGATED;
|
|
+
|
|
if (cmd == CMD_CREATE && conf->force_reload == FORCE_RELOAD_YES) {
|
|
p += snprintf(p, n, "reconfigure");
|
|
}
|
|
@@ -890,7 +893,7 @@ main (int argc, char *argv[])
|
|
multipath_conf = conf;
|
|
conf->retrigger_tries = 0;
|
|
conf->force_sync = 1;
|
|
- while ((arg = getopt(argc, argv, ":adcChl::eFfM:v:p:b:BrR:itTquUwW")) != EOF ) {
|
|
+ while ((arg = getopt(argc, argv, ":adDcChl::eFfM:v:p:b:BrR:itTquUwW")) != EOF ) {
|
|
switch(arg) {
|
|
case 1: printf("optarg : %s\n",optarg);
|
|
break;
|
|
@@ -922,6 +925,9 @@ main (int argc, char *argv[])
|
|
if (cmd == CMD_CREATE)
|
|
cmd = CMD_DRY_RUN;
|
|
break;
|
|
+ case 'D':
|
|
+ conf->skip_delegate = 1;
|
|
+ break;
|
|
case 'f':
|
|
cmd = CMD_FLUSH_ONE;
|
|
break;
|
|
--
|
|
2.17.2
|
|
|