device-mapper-multipath-0.8.7-1
Update source to upstream version 0.8.7 * Previous patches 0001-0023 are included in the commit. Add patches from upstream staging branch * Patches 0001-0010 are from the upstream staging branch Rename redhat patches * Previous patches 0024-0033 are now patches 0011-0020
This commit is contained in:
parent
2d373b6820
commit
a4b79a10d4
1
.gitignore
vendored
1
.gitignore
vendored
@ -22,3 +22,4 @@ multipath-tools-091027.tar.gz
|
|||||||
/multipath-tools-0.8.4.tgz
|
/multipath-tools-0.8.4.tgz
|
||||||
/multipath-tools-0.8.5.tgz
|
/multipath-tools-0.8.5.tgz
|
||||||
/multipath-tools-0.8.6.tgz
|
/multipath-tools-0.8.6.tgz
|
||||||
|
/multipath-tools-0.8.7.tgz
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: lixiaokeng <lixiaokeng@huawei.com>
|
|
||||||
Date: Fri, 9 Apr 2021 15:15:05 +0800
|
|
||||||
Subject: [PATCH] libmultipath: fix memory leak in checker_cleanup_thread
|
|
||||||
|
|
||||||
If checker_cleanup_thread is called after cleanup_checkers,
|
|
||||||
the checker_class will not be freed.
|
|
||||||
|
|
||||||
Here, we use free_checker_class instead of checker_class_unref
|
|
||||||
in checker_cleanup_thread.
|
|
||||||
|
|
||||||
Signed-off-by: Lixiaokeng <lixiaokeng@huawei.com>
|
|
||||||
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
---
|
|
||||||
libmultipath/checkers.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/libmultipath/checkers.c b/libmultipath/checkers.c
|
|
||||||
index 2dd9915d..8039c2bf 100644
|
|
||||||
--- a/libmultipath/checkers.c
|
|
||||||
+++ b/libmultipath/checkers.c
|
|
||||||
@@ -368,7 +368,7 @@ static void checker_cleanup_thread(void *arg)
|
|
||||||
{
|
|
||||||
struct checker_class *cls = arg;
|
|
||||||
|
|
||||||
- (void)checker_class_unref(cls);
|
|
||||||
+ free_checker_class(cls);
|
|
||||||
rcu_unregister_thread();
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,45 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
||||||
|
Date: Wed, 8 Sep 2021 22:33:54 +0200
|
||||||
|
Subject: [PATCH] multipath-tools: add info about IO affinity path selector to
|
||||||
|
manpage
|
||||||
|
|
||||||
|
Added in 5.11: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e4d2e82b2300b03f66b3ca8417590c86e661fab1
|
||||||
|
|
||||||
|
Cc: Mike Christie <michael.christie@oracle.com>
|
||||||
|
Cc: Martin Wilck <mwilck@suse.com>
|
||||||
|
Cc: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
|
||||||
|
Cc: DM-DEVEL ML <dm-devel@redhat.com>
|
||||||
|
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
||||||
|
|
||||||
|
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
||||||
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
---
|
||||||
|
multipath/multipath.conf.5 | 6 +++++-
|
||||||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
|
||||||
|
index d6b8c7f6..42a15ffd 100644
|
||||||
|
--- a/multipath/multipath.conf.5
|
||||||
|
+++ b/multipath/multipath.conf.5
|
||||||
|
@@ -6,7 +6,7 @@
|
||||||
|
.\"
|
||||||
|
.\" ----------------------------------------------------------------------------
|
||||||
|
.
|
||||||
|
-.TH MULTIPATH.CONF 5 2018-05-21 Linux
|
||||||
|
+.TH MULTIPATH.CONF 5 2021-09-08 Linux
|
||||||
|
.
|
||||||
|
.
|
||||||
|
.\" ----------------------------------------------------------------------------
|
||||||
|
@@ -210,6 +210,10 @@ of outstanding I/O to the path and its relative throughput.
|
||||||
|
estimation of future service time based on the history of previous I/O submitted
|
||||||
|
to each path.
|
||||||
|
.TP
|
||||||
|
+.I "io-affinity 0"
|
||||||
|
+(Since 5.11 kernel) Choose the path for the next bunch of I/O based on a CPU to
|
||||||
|
+path mapping the user passes in and what CPU we are executing on.
|
||||||
|
+.TP
|
||||||
|
The default is: \fBservice-time 0\fR
|
||||||
|
.RE
|
||||||
|
.
|
@ -1,85 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Martin Wilck <mwilck@suse.com>
|
|
||||||
Date: Wed, 12 May 2021 23:06:51 +0200
|
|
||||||
Subject: [PATCH] multipathd: fix compilation issue with liburcu < 0.8
|
|
||||||
|
|
||||||
To avoid race conditions with pending RCU callbacks on exit, it's
|
|
||||||
necessary to call rcu_barrier() in cleanup_rcu() (see
|
|
||||||
https://lists.lttng.org/pipermail/lttng-dev/2021-May/029958.html and
|
|
||||||
follow-ups).
|
|
||||||
|
|
||||||
rcu_barrier() is only available in User-space RCU v0.8 and newer.
|
|
||||||
Fix it by reverting 5d0dae6 ("multipathd: Fix liburcu memory leak")
|
|
||||||
if an older version of liburcu is detected.
|
|
||||||
|
|
||||||
Fixes: 5d0dae6 ("multipathd: Fix liburcu memory leak")
|
|
||||||
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
---
|
|
||||||
multipathd/Makefile | 2 ++
|
|
||||||
multipathd/main.c | 17 +++++++++++++++--
|
|
||||||
2 files changed, 17 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/multipathd/Makefile b/multipathd/Makefile
|
|
||||||
index d053c1ed..393b6cbb 100644
|
|
||||||
--- a/multipathd/Makefile
|
|
||||||
+++ b/multipathd/Makefile
|
|
||||||
@@ -16,6 +16,8 @@ LDFLAGS += $(BIN_LDFLAGS)
|
|
||||||
LIBDEPS += -L$(multipathdir) -lmultipath -L$(mpathpersistdir) -lmpathpersist \
|
|
||||||
-L$(mpathcmddir) -lmpathcmd -ludev -ldl -lurcu -lpthread \
|
|
||||||
-ldevmapper -lreadline
|
|
||||||
+CFLAGS += $(shell $(PKGCONFIG) --modversion liburcu 2>/dev/null | \
|
|
||||||
+ awk -F. '{ printf("-DURCU_VERSION=0x%06x", 256 * ( 256 * $$1 + $$2) + $$3); }')
|
|
||||||
|
|
||||||
ifdef SYSTEMD
|
|
||||||
CFLAGS += -DUSE_SYSTEMD=$(SYSTEMD)
|
|
||||||
diff --git a/multipathd/main.c b/multipathd/main.c
|
|
||||||
index 102946bf..c34fd9c8 100644
|
|
||||||
--- a/multipathd/main.c
|
|
||||||
+++ b/multipathd/main.c
|
|
||||||
@@ -3031,6 +3031,10 @@ static void cleanup_threads(void)
|
|
||||||
pthread_attr_destroy(&waiter_attr);
|
|
||||||
}
|
|
||||||
|
|
||||||
+#ifndef URCU_VERSION
|
|
||||||
+# define URCU_VERSION 0
|
|
||||||
+#endif
|
|
||||||
+#if (URCU_VERSION >= 0x000800)
|
|
||||||
/*
|
|
||||||
* Use a non-default call_rcu_data for child().
|
|
||||||
*
|
|
||||||
@@ -3040,6 +3044,9 @@ static void cleanup_threads(void)
|
|
||||||
* can't be joined with pthread_join(), leaving a memory leak.
|
|
||||||
*
|
|
||||||
* Therefore we create our own, which can be destroyed and joined.
|
|
||||||
+ * The cleanup handler needs to call rcu_barrier(), which is only
|
|
||||||
+ * available in user-space RCU v0.8 and newer. See
|
|
||||||
+ * https://lists.lttng.org/pipermail/lttng-dev/2021-May/029958.html
|
|
||||||
*/
|
|
||||||
static struct call_rcu_data *setup_rcu(void)
|
|
||||||
{
|
|
||||||
@@ -3072,6 +3079,7 @@ static void cleanup_rcu(void)
|
|
||||||
}
|
|
||||||
rcu_unregister_thread();
|
|
||||||
}
|
|
||||||
+#endif /* URCU_VERSION */
|
|
||||||
|
|
||||||
static void cleanup_child(void)
|
|
||||||
{
|
|
||||||
@@ -3116,9 +3124,14 @@ child (__attribute__((unused)) void *param)
|
|
||||||
init_unwinder();
|
|
||||||
mlockall(MCL_CURRENT | MCL_FUTURE);
|
|
||||||
signal_init();
|
|
||||||
+#if (URCU_VERSION >= 0x000800)
|
|
||||||
mp_rcu_data = setup_rcu();
|
|
||||||
-
|
|
||||||
- if (atexit(cleanup_rcu) || atexit(cleanup_child))
|
|
||||||
+ if (atexit(cleanup_rcu))
|
|
||||||
+ fprintf(stderr, "failed to register RCU cleanup handler\n");
|
|
||||||
+#else
|
|
||||||
+ rcu_init();
|
|
||||||
+#endif
|
|
||||||
+ if (atexit(cleanup_child))
|
|
||||||
fprintf(stderr, "failed to register cleanup handlers\n");
|
|
||||||
|
|
||||||
setup_thread_attr(&misc_attr, 64 * 1024, 0);
|
|
@ -0,0 +1,52 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: lixiaokeng <lixiaokeng@huawei.com>
|
||||||
|
Date: Mon, 13 Sep 2021 10:43:14 +0800
|
||||||
|
Subject: [PATCH] multipathd: fix missing persistent reseravtion for active
|
||||||
|
path
|
||||||
|
|
||||||
|
There are two paths(sucu as sda and adb) for one LUN. The two
|
||||||
|
paths log in, but before the two uevents have been processed
|
||||||
|
(for example there are many uevent), users use multipathd add
|
||||||
|
path /dev/sda to cause mpatha and use mpathpersist -o -I to
|
||||||
|
register prkey for mpatha. The add map uevent is after add path
|
||||||
|
uevent, the the uevent(add sdb) will delay and missing persistent
|
||||||
|
reseravtion check.
|
||||||
|
|
||||||
|
Here, we add persistent reseravtion check in update_map() which
|
||||||
|
is called ev_add_map().
|
||||||
|
|
||||||
|
Signed-off-by: Lixiaokeng <lixiaokeng@huawei.com>
|
||||||
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
---
|
||||||
|
multipathd/main.c | 11 +++++++++++
|
||||||
|
1 file changed, 11 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/multipathd/main.c b/multipathd/main.c
|
||||||
|
index 3aff241d..1defeaf1 100644
|
||||||
|
--- a/multipathd/main.c
|
||||||
|
+++ b/multipathd/main.c
|
||||||
|
@@ -490,6 +490,8 @@ update_map (struct multipath *mpp, struct vectors *vecs, int new_map)
|
||||||
|
{
|
||||||
|
int retries = 3;
|
||||||
|
char *params __attribute__((cleanup(cleanup_charp))) = NULL;
|
||||||
|
+ struct path *pp;
|
||||||
|
+ int i;
|
||||||
|
|
||||||
|
retry:
|
||||||
|
condlog(4, "%s: updating new map", mpp->alias);
|
||||||
|
@@ -502,6 +504,15 @@ retry:
|
||||||
|
verify_paths(mpp);
|
||||||
|
mpp->action = ACT_RELOAD;
|
||||||
|
|
||||||
|
+ if (mpp->prflag) {
|
||||||
|
+ vector_foreach_slot(mpp->paths, pp, i) {
|
||||||
|
+ if ((pp->state == PATH_UP) || (pp->state == PATH_GHOST)) {
|
||||||
|
+ /* persistent reseravtion check*/
|
||||||
|
+ mpath_pr_event_handle(pp);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (setup_map(mpp, ¶ms, vecs)) {
|
||||||
|
condlog(0, "%s: failed to setup new map in update", mpp->alias);
|
||||||
|
retries = -1;
|
@ -0,0 +1,48 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
||||||
|
Date: Thu, 16 Sep 2021 00:44:49 +0200
|
||||||
|
Subject: [PATCH] multipath-tools: minor fixes to multipath.conf.5 man page
|
||||||
|
|
||||||
|
Cc: Martin Wilck <mwilck@suse.com>
|
||||||
|
Cc: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
|
||||||
|
Cc: DM-DEVEL ML <dm-devel@redhat.com>
|
||||||
|
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
||||||
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
---
|
||||||
|
multipath/multipath.conf.5 | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
|
||||||
|
index 42a15ffd..c74129bd 100644
|
||||||
|
--- a/multipath/multipath.conf.5
|
||||||
|
+++ b/multipath/multipath.conf.5
|
||||||
|
@@ -1,9 +1,9 @@
|
||||||
|
.\" ----------------------------------------------------------------------------
|
||||||
|
-.\" Update the date below if you make any significant change.
|
||||||
|
.\" Make sure there are no errors with:
|
||||||
|
.\" groff -z -wall -b -e -t multipath/multipath.conf.5
|
||||||
|
.\" man --warnings -E UTF-8 -l -Tutf8 -Z multipath/multipath.conf.5 >/dev/null
|
||||||
|
.\"
|
||||||
|
+.\" Update the date below if you make any significant change.
|
||||||
|
.\" ----------------------------------------------------------------------------
|
||||||
|
.
|
||||||
|
.TH MULTIPATH.CONF 5 2021-09-08 Linux
|
||||||
|
@@ -189,7 +189,7 @@ The default is: \fB<system dependent>\fR
|
||||||
|
.TP
|
||||||
|
.B path_selector
|
||||||
|
The default path selector algorithm to use; they are offered by the
|
||||||
|
-kernel multipath target. There are three selector algorithms:
|
||||||
|
+kernel multipath target:
|
||||||
|
.RS
|
||||||
|
.TP 12
|
||||||
|
.I "round-robin 0"
|
||||||
|
@@ -206,7 +206,7 @@ of outstanding I/O to the path.
|
||||||
|
of outstanding I/O to the path and its relative throughput.
|
||||||
|
.TP
|
||||||
|
.I "historical-service-time 0"
|
||||||
|
-(Since 5.8 kernel) Choose the path for the next bunch of IOs based on the
|
||||||
|
+(Since 5.8 kernel) Choose the path for the next bunch of I/O based on the
|
||||||
|
estimation of future service time based on the history of previous I/O submitted
|
||||||
|
to each path.
|
||||||
|
.TP
|
@ -1,70 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Date: Mon, 17 May 2021 11:29:54 -0500
|
|
||||||
Subject: [PATCH] multipathd: don't fail to remove path once the map is removed
|
|
||||||
|
|
||||||
In ev_remove_path(), if update_mpp_paths() fails, we delete the entire
|
|
||||||
map. However, since update_mpp_paths() happens before we call
|
|
||||||
set_path_removed(), pp->initialized isn't set to INIT_REMOVED, so
|
|
||||||
remove_map_and_stop_waiter() doesn't remove the path when in removes the
|
|
||||||
map. But with the map removed, there's nothing to keep us from removing
|
|
||||||
the path.
|
|
||||||
|
|
||||||
Call set_path_removed() before update_mpp_paths() to avoid the odd case
|
|
||||||
of ev_remove_path() removing the map but not the path.
|
|
||||||
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
|
||||||
---
|
|
||||||
libmultipath/structs_vec.c | 4 ++--
|
|
||||||
multipathd/main.c | 13 ++++++++-----
|
|
||||||
2 files changed, 10 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
|
|
||||||
index d242c06b..75390198 100644
|
|
||||||
--- a/libmultipath/structs_vec.c
|
|
||||||
+++ b/libmultipath/structs_vec.c
|
|
||||||
@@ -45,8 +45,8 @@ int update_mpp_paths(struct multipath *mpp, vector pathvec)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Avoid adding removed paths to the map again
|
|
||||||
- * when we reload it. Such paths may exist if
|
|
||||||
- * domap fails in ev_remove_path().
|
|
||||||
+ * when we reload it. Such paths may exist in
|
|
||||||
+ * ev_remove_paths() or if it returns failure.
|
|
||||||
*/
|
|
||||||
pp1 = find_path_by_devt(pathvec, pp->dev_t);
|
|
||||||
if (pp1 && pp->initialized != INIT_REMOVED &&
|
|
||||||
diff --git a/multipathd/main.c b/multipathd/main.c
|
|
||||||
index c34fd9c8..2062bc10 100644
|
|
||||||
--- a/multipathd/main.c
|
|
||||||
+++ b/multipathd/main.c
|
|
||||||
@@ -1199,6 +1199,13 @@ ev_remove_path (struct path *pp, struct vectors * vecs, int need_do_map)
|
|
||||||
* avoid referring to the map of an orphaned path
|
|
||||||
*/
|
|
||||||
if ((mpp = pp->mpp)) {
|
|
||||||
+ /*
|
|
||||||
+ * Mark the path as removed. In case of success, we
|
|
||||||
+ * will delete it for good. Otherwise, it will be deleted
|
|
||||||
+ * later, unless all attempts to reload this map fail.
|
|
||||||
+ */
|
|
||||||
+ set_path_removed(pp);
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* transform the mp->pg vector of vectors of paths
|
|
||||||
* into a mp->params string to feed the device-mapper
|
|
||||||
@@ -1210,13 +1217,9 @@ ev_remove_path (struct path *pp, struct vectors * vecs, int need_do_map)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
- * Mark the path as removed. In case of success, we
|
|
||||||
- * will delete it for good. Otherwise, it will be deleted
|
|
||||||
- * later, unless all attempts to reload this map fail.
|
|
||||||
- * Note: we have to explicitly remove pp from mpp->paths,
|
|
||||||
+ * we have to explicitly remove pp from mpp->paths,
|
|
||||||
* update_mpp_paths() doesn't do that.
|
|
||||||
*/
|
|
||||||
- set_path_removed(pp);
|
|
||||||
i = find_slot(mpp->paths, pp);
|
|
||||||
if (i != -1)
|
|
||||||
vector_del_slot(mpp->paths, i);
|
|
@ -0,0 +1,39 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
||||||
|
Date: Sat, 25 Sep 2021 00:27:36 +0200
|
||||||
|
Subject: [PATCH] multipath-tools: make IBM/XIV config work with alua and
|
||||||
|
multibus
|
||||||
|
|
||||||
|
And add recommended pgfailback value.
|
||||||
|
|
||||||
|
ALUA is supported since XIV_Gen2 and microcode 10.2.1
|
||||||
|
(All ports across all controllers in single Target Port Group)
|
||||||
|
|
||||||
|
https://www.ibm.com/support/pages/ibm-flashsystem%C2%AE-a9000-and-a9000r-hyperswap-solution-deployment-linux%C2%AE-ibm-z-systems%C2%AE
|
||||||
|
https://www.google.com/search?q=%222810XIV%22+%22path_grouping_policy%22+site%3Aibm.com
|
||||||
|
|
||||||
|
Cc: Martin Wilck <mwilck@suse.com>
|
||||||
|
Cc: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
|
||||||
|
Cc: DM-DEVEL ML <dm-devel@redhat.com>
|
||||||
|
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
||||||
|
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
||||||
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
---
|
||||||
|
libmultipath/hwtable.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
|
||||||
|
index 0caac0da..72f81c60 100644
|
||||||
|
--- a/libmultipath/hwtable.c
|
||||||
|
+++ b/libmultipath/hwtable.c
|
||||||
|
@@ -712,7 +712,8 @@ static struct hwentry default_hw[] = {
|
||||||
|
.vendor = "(XIV|IBM)",
|
||||||
|
.product = "(NEXTRA|2810XIV)",
|
||||||
|
.no_path_retry = NO_PATH_RETRY_QUEUE,
|
||||||
|
- .pgpolicy = MULTIBUS,
|
||||||
|
+ .pgpolicy = GROUP_BY_PRIO,
|
||||||
|
+ .pgfailback = 15,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
/* TMS RamSan / FlashSystem 710/720/810/820/840/900 */
|
@ -1,27 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Date: Mon, 17 May 2021 11:29:55 -0500
|
|
||||||
Subject: [PATCH] multipathd: remove duplicate orphan_paths in flush_map
|
|
||||||
|
|
||||||
remove_map_and_stop_waiter() already calls orphan_paths() so flush_map()
|
|
||||||
doesn't need to call orphan_paths() before calling
|
|
||||||
remove_map_and_stop_waiter().
|
|
||||||
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
|
||||||
---
|
|
||||||
multipathd/main.c | 1 -
|
|
||||||
1 file changed, 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/multipathd/main.c b/multipathd/main.c
|
|
||||||
index 2062bc10..266d6b44 100644
|
|
||||||
--- a/multipathd/main.c
|
|
||||||
+++ b/multipathd/main.c
|
|
||||||
@@ -660,7 +660,6 @@ flush_map(struct multipath * mpp, struct vectors * vecs, int nopaths)
|
|
||||||
else
|
|
||||||
condlog(2, "%s: map flushed", mpp->alias);
|
|
||||||
|
|
||||||
- orphan_paths(vecs->pathvec, mpp, "map flushed");
|
|
||||||
remove_map_and_stop_waiter(mpp, vecs);
|
|
||||||
|
|
||||||
return 0;
|
|
@ -1,226 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Date: Mon, 17 May 2021 11:29:56 -0500
|
|
||||||
Subject: [PATCH] multipathd: fix ev_remove_path return code handling
|
|
||||||
|
|
||||||
When ev_remove_path() returned success, callers assumed that the path
|
|
||||||
(and possibly the map) had been removed. When ev_remove_path() returned
|
|
||||||
failure, callers assumed that the path had not been removed. However,
|
|
||||||
the path could be removed on both success or failure. This could cause
|
|
||||||
callers to dereference the path after it was removed.
|
|
||||||
|
|
||||||
To deal with this, make ev_remove_path() return a different symbolic
|
|
||||||
value for each outcome, and make the callers react appropriately for
|
|
||||||
the different values. Found by coverity.
|
|
||||||
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
|
||||||
---
|
|
||||||
multipathd/cli_handlers.c | 24 +++++++++++++++++++++--
|
|
||||||
multipathd/main.c | 41 ++++++++++++++++++++-------------------
|
|
||||||
multipathd/main.h | 14 +++++++++++++
|
|
||||||
3 files changed, 57 insertions(+), 22 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c
|
|
||||||
index 1de6ad8e..6765fcf0 100644
|
|
||||||
--- a/multipathd/cli_handlers.c
|
|
||||||
+++ b/multipathd/cli_handlers.c
|
|
||||||
@@ -752,7 +752,8 @@ cli_add_path (void * v, char ** reply, int * len, void * data)
|
|
||||||
/* Have the checker reinstate this path asap */
|
|
||||||
pp->tick = 1;
|
|
||||||
return 0;
|
|
||||||
- } else if (!ev_remove_path(pp, vecs, true))
|
|
||||||
+ } else if (ev_remove_path(pp, vecs, true) &
|
|
||||||
+ REMOVE_PATH_SUCCESS)
|
|
||||||
/* Path removed in ev_remove_path() */
|
|
||||||
pp = NULL;
|
|
||||||
else {
|
|
||||||
@@ -813,6 +814,7 @@ cli_del_path (void * v, char ** reply, int * len, void * data)
|
|
||||||
struct vectors * vecs = (struct vectors *)data;
|
|
||||||
char * param = get_keyparam(v, PATH);
|
|
||||||
struct path *pp;
|
|
||||||
+ int ret;
|
|
||||||
|
|
||||||
param = convert_dev(param, 1);
|
|
||||||
condlog(2, "%s: remove path (operator)", param);
|
|
||||||
@@ -821,7 +823,25 @@ cli_del_path (void * v, char ** reply, int * len, void * data)
|
|
||||||
condlog(0, "%s: path already removed", param);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
- return ev_remove_path(pp, vecs, 1);
|
|
||||||
+ ret = ev_remove_path(pp, vecs, 1);
|
|
||||||
+ if (ret == REMOVE_PATH_DELAY) {
|
|
||||||
+ *reply = strdup("delayed\n");
|
|
||||||
+ if (*reply)
|
|
||||||
+ *len = strlen(*reply) + 1;
|
|
||||||
+ else {
|
|
||||||
+ *len = 0;
|
|
||||||
+ ret = REMOVE_PATH_FAILURE;
|
|
||||||
+ }
|
|
||||||
+ } else if (ret == REMOVE_PATH_MAP_ERROR) {
|
|
||||||
+ *reply = strdup("map reload error. removed\n");
|
|
||||||
+ if (*reply)
|
|
||||||
+ *len = strlen(*reply) + 1;
|
|
||||||
+ else {
|
|
||||||
+ *len = 0;
|
|
||||||
+ ret = REMOVE_PATH_FAILURE;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ return (ret == REMOVE_PATH_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
diff --git a/multipathd/main.c b/multipathd/main.c
|
|
||||||
index 266d6b44..26a4e44e 100644
|
|
||||||
--- a/multipathd/main.c
|
|
||||||
+++ b/multipathd/main.c
|
|
||||||
@@ -838,7 +838,7 @@ handle_path_wwid_change(struct path *pp, struct vectors *vecs)
|
|
||||||
return;
|
|
||||||
|
|
||||||
udd = udev_device_ref(pp->udev);
|
|
||||||
- if (ev_remove_path(pp, vecs, 1) != 0 && pp->mpp) {
|
|
||||||
+ if (!(ev_remove_path(pp, vecs, 1) & REMOVE_PATH_SUCCESS) && pp->mpp) {
|
|
||||||
pp->dmstate = PSTATE_FAILED;
|
|
||||||
dm_fail_path(pp->mpp->alias, pp->dev_t);
|
|
||||||
}
|
|
||||||
@@ -948,8 +948,8 @@ uev_add_path (struct uevent *uev, struct vectors * vecs, int need_do_map)
|
|
||||||
* Make another attempt to remove the path
|
|
||||||
*/
|
|
||||||
pp->mpp = prev_mpp;
|
|
||||||
- ret = ev_remove_path(pp, vecs, true);
|
|
||||||
- if (ret != 0) {
|
|
||||||
+ if (!(ev_remove_path(pp, vecs, true) &
|
|
||||||
+ REMOVE_PATH_SUCCESS)) {
|
|
||||||
/*
|
|
||||||
* Failure in ev_remove_path will keep
|
|
||||||
* path in pathvec in INIT_REMOVED state
|
|
||||||
@@ -960,6 +960,7 @@ uev_add_path (struct uevent *uev, struct vectors * vecs, int need_do_map)
|
|
||||||
dm_fail_path(pp->mpp->alias, pp->dev_t);
|
|
||||||
condlog(1, "%s: failed to re-add path still mapped in %s",
|
|
||||||
pp->dev, pp->mpp->alias);
|
|
||||||
+ ret = 1;
|
|
||||||
} else if (r == PATHINFO_OK)
|
|
||||||
/*
|
|
||||||
* Path successfully freed, move on to
|
|
||||||
@@ -1167,7 +1168,6 @@ static int
|
|
||||||
uev_remove_path (struct uevent *uev, struct vectors * vecs, int need_do_map)
|
|
||||||
{
|
|
||||||
struct path *pp;
|
|
||||||
- int ret;
|
|
||||||
|
|
||||||
condlog(3, "%s: remove path (uevent)", uev->kernel);
|
|
||||||
delete_foreign(uev->udev);
|
|
||||||
@@ -1177,21 +1177,18 @@ uev_remove_path (struct uevent *uev, struct vectors * vecs, int need_do_map)
|
|
||||||
pthread_testcancel();
|
|
||||||
pp = find_path_by_dev(vecs->pathvec, uev->kernel);
|
|
||||||
if (pp)
|
|
||||||
- ret = ev_remove_path(pp, vecs, need_do_map);
|
|
||||||
+ ev_remove_path(pp, vecs, need_do_map);
|
|
||||||
lock_cleanup_pop(vecs->lock);
|
|
||||||
- if (!pp) {
|
|
||||||
- /* Not an error; path might have been purged earlier */
|
|
||||||
+ if (!pp) /* Not an error; path might have been purged earlier */
|
|
||||||
condlog(0, "%s: path already removed", uev->kernel);
|
|
||||||
- return 0;
|
|
||||||
- }
|
|
||||||
- return ret;
|
|
||||||
+ return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
ev_remove_path (struct path *pp, struct vectors * vecs, int need_do_map)
|
|
||||||
{
|
|
||||||
struct multipath * mpp;
|
|
||||||
- int i, retval = 0;
|
|
||||||
+ int i, retval = REMOVE_PATH_SUCCESS;
|
|
||||||
char params[PARAMS_SIZE] = {0};
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -1245,7 +1242,6 @@ ev_remove_path (struct path *pp, struct vectors * vecs, int need_do_map)
|
|
||||||
condlog(2, "%s: removed map after"
|
|
||||||
" removing all paths",
|
|
||||||
alias);
|
|
||||||
- retval = 0;
|
|
||||||
/* flush_map() has freed the path */
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
@@ -1262,11 +1258,14 @@ ev_remove_path (struct path *pp, struct vectors * vecs, int need_do_map)
|
|
||||||
|
|
||||||
if (mpp->wait_for_udev) {
|
|
||||||
mpp->wait_for_udev = 2;
|
|
||||||
+ retval = REMOVE_PATH_DELAY;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (!need_do_map)
|
|
||||||
+ if (!need_do_map) {
|
|
||||||
+ retval = REMOVE_PATH_DELAY;
|
|
||||||
goto out;
|
|
||||||
+ }
|
|
||||||
/*
|
|
||||||
* reload the map
|
|
||||||
*/
|
|
||||||
@@ -1275,7 +1274,7 @@ ev_remove_path (struct path *pp, struct vectors * vecs, int need_do_map)
|
|
||||||
condlog(0, "%s: failed in domap for "
|
|
||||||
"removal of path %s",
|
|
||||||
mpp->alias, pp->dev);
|
|
||||||
- retval = 1;
|
|
||||||
+ retval = REMOVE_PATH_FAILURE;
|
|
||||||
} else {
|
|
||||||
/*
|
|
||||||
* update our state from kernel
|
|
||||||
@@ -1283,12 +1282,12 @@ ev_remove_path (struct path *pp, struct vectors * vecs, int need_do_map)
|
|
||||||
char devt[BLK_DEV_SIZE];
|
|
||||||
|
|
||||||
strlcpy(devt, pp->dev_t, sizeof(devt));
|
|
||||||
+
|
|
||||||
+ /* setup_multipath will free the path
|
|
||||||
+ * regardless of whether it succeeds or
|
|
||||||
+ * fails */
|
|
||||||
if (setup_multipath(vecs, mpp))
|
|
||||||
- return 1;
|
|
||||||
- /*
|
|
||||||
- * Successful map reload without this path:
|
|
||||||
- * sync_map_state() will free it.
|
|
||||||
- */
|
|
||||||
+ return REMOVE_PATH_MAP_ERROR;
|
|
||||||
sync_map_state(mpp);
|
|
||||||
|
|
||||||
condlog(2, "%s: path removed from map %s",
|
|
||||||
@@ -1304,8 +1303,10 @@ out:
|
|
||||||
return retval;
|
|
||||||
|
|
||||||
fail:
|
|
||||||
+ condlog(0, "%s: error removing path. removing map %s", pp->dev,
|
|
||||||
+ mpp->alias);
|
|
||||||
remove_map_and_stop_waiter(mpp, vecs);
|
|
||||||
- return 1;
|
|
||||||
+ return REMOVE_PATH_MAP_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
diff --git a/multipathd/main.h b/multipathd/main.h
|
|
||||||
index ddd953f9..bc1f938f 100644
|
|
||||||
--- a/multipathd/main.h
|
|
||||||
+++ b/multipathd/main.h
|
|
||||||
@@ -13,6 +13,20 @@ enum daemon_status {
|
|
||||||
DAEMON_STATUS_SIZE,
|
|
||||||
};
|
|
||||||
|
|
||||||
+enum remove_path_result {
|
|
||||||
+ REMOVE_PATH_FAILURE = 0x0, /* path could not be removed. It is still
|
|
||||||
+ * part of the kernel map, but its state
|
|
||||||
+ * is set to INIT_REMOVED, and it will be
|
|
||||||
+ * removed at the next possible occassion */
|
|
||||||
+ REMOVE_PATH_SUCCESS = 0x1, /* path was removed */
|
|
||||||
+ REMOVE_PATH_DELAY = 0x2, /* path is set to be removed later. it
|
|
||||||
+ * currently still exists and is part of the
|
|
||||||
+ * kernel map */
|
|
||||||
+ REMOVE_PATH_MAP_ERROR = 0x5, /* map was removed because of error. value
|
|
||||||
+ * includes REMOVE_PATH_SUCCESS bit
|
|
||||||
+ * because the path was also removed */
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
struct prout_param_descriptor;
|
|
||||||
struct prin_resp;
|
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Luca BRUNO <luca.bruno@coreos.com>
|
||||||
|
Date: Fri, 24 Sep 2021 09:34:01 +0000
|
||||||
|
Subject: [PATCH] multipathd.socket: add missing conditions from service unit
|
||||||
|
|
||||||
|
This aligns 'multipathd' socket and service units, by adding the
|
||||||
|
start conditions that are set on the service but not on the socket.
|
||||||
|
It should help avoiding situations where the socket unit ends up
|
||||||
|
marked as failed after hitting its retry-limit.
|
||||||
|
|
||||||
|
Fixes: https://github.com/opensvc/multipath-tools/issues/15
|
||||||
|
Signed-off-by: Luca BRUNO <luca.bruno@coreos.com>
|
||||||
|
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
||||||
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
---
|
||||||
|
multipathd/multipathd.socket | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/multipathd/multipathd.socket b/multipathd/multipathd.socket
|
||||||
|
index 0ed4a1f7..c777e5e3 100644
|
||||||
|
--- a/multipathd/multipathd.socket
|
||||||
|
+++ b/multipathd/multipathd.socket
|
||||||
|
@@ -1,6 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=multipathd control socket
|
||||||
|
DefaultDependencies=no
|
||||||
|
+ConditionKernelCommandLine=!nompath
|
||||||
|
+ConditionKernelCommandLine=!multipath=off
|
||||||
|
+ConditionVirtualization=!container
|
||||||
|
Before=sockets.target
|
||||||
|
|
||||||
|
[Socket]
|
@ -1,47 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Date: Mon, 17 May 2021 11:29:57 -0500
|
|
||||||
Subject: [PATCH] multipath: free vectors in configure
|
|
||||||
|
|
||||||
configure() can retry multiple times, each time reallocing a maps and
|
|
||||||
paths vector, and leaking the previous ones. Fix this by always freeing
|
|
||||||
the vectors before configure() exits. Found by coverity.
|
|
||||||
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
|
||||||
---
|
|
||||||
multipath/main.c | 7 ++++++-
|
|
||||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/multipath/main.c b/multipath/main.c
|
|
||||||
index ef89c7cf..8fc0e15f 100644
|
|
||||||
--- a/multipath/main.c
|
|
||||||
+++ b/multipath/main.c
|
|
||||||
@@ -466,7 +466,6 @@ configure (struct config *conf, enum mpath_cmds cmd,
|
|
||||||
*/
|
|
||||||
curmp = vector_alloc();
|
|
||||||
pathvec = vector_alloc();
|
|
||||||
- atexit(cleanup_vecs);
|
|
||||||
|
|
||||||
if (!curmp || !pathvec) {
|
|
||||||
condlog(0, "can not allocate memory");
|
|
||||||
@@ -578,6 +577,11 @@ out:
|
|
||||||
if (refwwid)
|
|
||||||
FREE(refwwid);
|
|
||||||
|
|
||||||
+ free_multipathvec(curmp, KEEP_PATHS);
|
|
||||||
+ vecs.mpvec = NULL;
|
|
||||||
+ free_pathvec(pathvec, FREE_PATHS);
|
|
||||||
+ vecs.pathvec = NULL;
|
|
||||||
+
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -823,6 +827,7 @@ main (int argc, char *argv[])
|
|
||||||
conf = get_multipath_config();
|
|
||||||
conf->retrigger_tries = 0;
|
|
||||||
conf->force_sync = 1;
|
|
||||||
+ atexit(cleanup_vecs);
|
|
||||||
while ((arg = getopt(argc, argv, ":adDcChl::eFfM:v:p:b:BrR:itTquUwW")) != EOF ) {
|
|
||||||
switch(arg) {
|
|
||||||
case 1: printf("optarg : %s\n",optarg);
|
|
@ -0,0 +1,40 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
||||||
|
Date: Tue, 28 Sep 2021 18:52:10 +0200
|
||||||
|
Subject: [PATCH] multipath-tools: make IBM/2107900 (DS8000) config work with
|
||||||
|
alua and multibus
|
||||||
|
|
||||||
|
ALUA is supported since the beginning:
|
||||||
|
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/scsi/device_handler/scsi_dh_alua.c?id=057ea7c9683c3d684128cced796f03c179ecf1c2#n683
|
||||||
|
|
||||||
|
... the DS8000 is an Asymmetric Logical Unit Access (ALUA) capable storage array,
|
||||||
|
pag#160(144): https://www.redbooks.ibm.com/redbooks/pdfs/sg248887.pdf
|
||||||
|
|
||||||
|
kernel log:
|
||||||
|
https://marc.info/?l=linux-scsi&m=156407413807511&q=mbox
|
||||||
|
|
||||||
|
Cc: Martin Wilck <mwilck@suse.com>
|
||||||
|
Cc: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
|
||||||
|
Cc: DM-DEVEL ML <dm-devel@redhat.com>
|
||||||
|
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
||||||
|
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
||||||
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
---
|
||||||
|
libmultipath/hwtable.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
|
||||||
|
index 72f81c60..f115c4f9 100644
|
||||||
|
--- a/libmultipath/hwtable.c
|
||||||
|
+++ b/libmultipath/hwtable.c
|
||||||
|
@@ -656,7 +656,8 @@ static struct hwentry default_hw[] = {
|
||||||
|
.vendor = "IBM",
|
||||||
|
.product = "^2107900",
|
||||||
|
.no_path_retry = NO_PATH_RETRY_QUEUE,
|
||||||
|
- .pgpolicy = MULTIBUS,
|
||||||
|
+ .pgpolicy = GROUP_BY_PRIO,
|
||||||
|
+ .pgfailback = -FAILBACK_IMMEDIATE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// Storwize V5000 and V7000 lines / SAN Volume Controller (SVC) / Flex System V7000 /
|
@ -1,28 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Date: Mon, 17 May 2021 11:29:58 -0500
|
|
||||||
Subject: [PATCH] kpartx: Don't leak memory when getblock returns NULL
|
|
||||||
|
|
||||||
If a new block was allocated, but couldn't be filled, getblock will
|
|
||||||
discard it. When it does so, it needs to free the block to avoid leaking
|
|
||||||
memory. Found by coverity.
|
|
||||||
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
|
||||||
---
|
|
||||||
kpartx/kpartx.c | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
|
|
||||||
index 8ff116b8..7bc64543 100644
|
|
||||||
--- a/kpartx/kpartx.c
|
|
||||||
+++ b/kpartx/kpartx.c
|
|
||||||
@@ -766,6 +766,8 @@ getblock (int fd, unsigned int blknr) {
|
|
||||||
if (read(fd, bp->block, secsz) != secsz) {
|
|
||||||
fprintf(stderr, "read error, sector %d\n", secnr);
|
|
||||||
blockhead = bp->next;
|
|
||||||
+ free(bp->block);
|
|
||||||
+ free(bp);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
||||||
|
Date: Tue, 28 Sep 2021 19:20:59 +0200
|
||||||
|
Subject: [PATCH] multipath-tools: make EMC/SYMMETRIX config work with alua and
|
||||||
|
multibus
|
||||||
|
|
||||||
|
ALUA is supported since VMAX3 and HYPERMAX OS 5977.811.784, pag#113:
|
||||||
|
https://www.delltechnologies.com/en-us/collaterals/unauth/technical-guides-support-information/products/storage-2/docu5128.pdf
|
||||||
|
|
||||||
|
Cc: Martin Wilck <mwilck@suse.com>
|
||||||
|
Cc: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
|
||||||
|
Cc: DM-DEVEL ML <dm-devel@redhat.com>
|
||||||
|
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
||||||
|
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
||||||
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
---
|
||||||
|
libmultipath/hwtable.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
|
||||||
|
index f115c4f9..7095aaf1 100644
|
||||||
|
--- a/libmultipath/hwtable.c
|
||||||
|
+++ b/libmultipath/hwtable.c
|
||||||
|
@@ -329,8 +329,9 @@ static struct hwentry default_hw[] = {
|
||||||
|
/* Symmetrix / DMX / VMAX / PowerMax */
|
||||||
|
.vendor = "EMC",
|
||||||
|
.product = "SYMMETRIX",
|
||||||
|
- .pgpolicy = MULTIBUS,
|
||||||
|
+ .pgpolicy = GROUP_BY_PRIO,
|
||||||
|
.no_path_retry = 6,
|
||||||
|
+ .pgfailback = -FAILBACK_IMMEDIATE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
/* DGC CLARiiON CX/AX / VNX and Unity */
|
@ -0,0 +1,37 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
||||||
|
Date: Tue, 28 Sep 2021 19:31:21 +0200
|
||||||
|
Subject: [PATCH] multipath-tools: make EMC/Invista config work with alua and
|
||||||
|
multibus
|
||||||
|
|
||||||
|
Optimal Path Management (OPM) was introduced with VPLEX 5.5 to improve VPLEX
|
||||||
|
performance. OPM uses the ALUA mechanism to spread the I/O load across VPLEX directors
|
||||||
|
while gaining cache locality, pag #187:
|
||||||
|
https://www.delltechnologies.com/en-us/collaterals/unauth/technical-guides-support-information/products/storage-2/docu5128.pdf
|
||||||
|
|
||||||
|
Cc: Martin Wilck <mwilck@suse.com>
|
||||||
|
Cc: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
|
||||||
|
Cc: DM-DEVEL ML <dm-devel@redhat.com>
|
||||||
|
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
||||||
|
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
||||||
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
---
|
||||||
|
libmultipath/hwtable.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
|
||||||
|
index 7095aaf1..4e8b52ff 100644
|
||||||
|
--- a/libmultipath/hwtable.c
|
||||||
|
+++ b/libmultipath/hwtable.c
|
||||||
|
@@ -350,8 +350,9 @@ static struct hwentry default_hw[] = {
|
||||||
|
.vendor = "EMC",
|
||||||
|
.product = "Invista",
|
||||||
|
.bl_product = "LUNZ",
|
||||||
|
- .pgpolicy = MULTIBUS,
|
||||||
|
+ .pgpolicy = GROUP_BY_PRIO,
|
||||||
|
.no_path_retry = 5,
|
||||||
|
+ .pgfailback = -FAILBACK_IMMEDIATE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
/* XtremIO */
|
@ -1,28 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Date: Mon, 17 May 2021 11:29:59 -0500
|
|
||||||
Subject: [PATCH] multipathd: don't rescan_path on wwid change in
|
|
||||||
uev_update_path
|
|
||||||
|
|
||||||
If get_uid() is returning a different wwid in uev_update_path(), then
|
|
||||||
the uid_attribute must have already gotten updated, which was the
|
|
||||||
purpose behind calling rescan_path() in the first place.
|
|
||||||
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
|
||||||
---
|
|
||||||
multipathd/main.c | 1 -
|
|
||||||
1 file changed, 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/multipathd/main.c b/multipathd/main.c
|
|
||||||
index 26a4e44e..2251e02c 100644
|
|
||||||
--- a/multipathd/main.c
|
|
||||||
+++ b/multipathd/main.c
|
|
||||||
@@ -1359,7 +1359,6 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
|
|
||||||
condlog(0, "%s: path wwid changed from '%s' to '%s'",
|
|
||||||
uev->kernel, wwid, pp->wwid);
|
|
||||||
ev_remove_path(pp, vecs, 1);
|
|
||||||
- rescan_path(uev->udev);
|
|
||||||
needs_reinit = 1;
|
|
||||||
goto out;
|
|
||||||
} else {
|
|
@ -0,0 +1,35 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
||||||
|
Date: Tue, 28 Sep 2021 22:15:56 +0200
|
||||||
|
Subject: [PATCH] multipath-tools: make "COMPELNT/Compellent Vol" config work
|
||||||
|
with alua and multibus
|
||||||
|
|
||||||
|
ALUA is needed by SAS arrays, pag#124:
|
||||||
|
https://downloads.dell.com/manuals/all-products/esuprt_solutions_int/esuprt_solutions_int_solutions_resources/general-solution-resources_white-papers2_en-us.pdf
|
||||||
|
|
||||||
|
Cc: Sean McGinnis <sean_mcginnis@dell.com>
|
||||||
|
Cc: Martin Wilck <mwilck@suse.com>
|
||||||
|
Cc: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
|
||||||
|
Cc: DM-DEVEL ML <dm-devel@redhat.com>
|
||||||
|
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
||||||
|
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
||||||
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
---
|
||||||
|
libmultipath/hwtable.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
|
||||||
|
index 4e8b52ff..7fc5bc04 100644
|
||||||
|
--- a/libmultipath/hwtable.c
|
||||||
|
+++ b/libmultipath/hwtable.c
|
||||||
|
@@ -368,7 +368,8 @@ static struct hwentry default_hw[] = {
|
||||||
|
*/
|
||||||
|
.vendor = "COMPELNT",
|
||||||
|
.product = "Compellent Vol",
|
||||||
|
- .pgpolicy = MULTIBUS,
|
||||||
|
+ .pgpolicy = GROUP_BY_PRIO,
|
||||||
|
+ .pgfailback = -FAILBACK_IMMEDIATE,
|
||||||
|
.no_path_retry = NO_PATH_RETRY_QUEUE,
|
||||||
|
},
|
||||||
|
{
|
@ -1,82 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Martin Wilck <mwilck@suse.com>
|
|
||||||
Date: Mon, 17 May 2021 22:37:34 +0200
|
|
||||||
Subject: [PATCH] multipathd: cli_handlers: cleanup setting reply length
|
|
||||||
|
|
||||||
Create a macro for setting the reply length for string literals
|
|
||||||
correctly, and use it where necessary.
|
|
||||||
|
|
||||||
In cli_del_path(), don't change the function's return code
|
|
||||||
if just the buffer allocation for the reply failed.
|
|
||||||
|
|
||||||
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
---
|
|
||||||
multipathd/cli_handlers.c | 33 ++++++++++++---------------------
|
|
||||||
1 file changed, 12 insertions(+), 21 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c
|
|
||||||
index 6765fcf0..96064944 100644
|
|
||||||
--- a/multipathd/cli_handlers.c
|
|
||||||
+++ b/multipathd/cli_handlers.c
|
|
||||||
@@ -32,6 +32,12 @@
|
|
||||||
#include "foreign.h"
|
|
||||||
#include "cli_handlers.h"
|
|
||||||
|
|
||||||
+#define SET_REPLY_AND_LEN(__rep, __len, string_literal) \
|
|
||||||
+ do { \
|
|
||||||
+ *(__rep) = strdup(string_literal); \
|
|
||||||
+ *(__len) = *(__rep) ? sizeof(string_literal) : 0; \
|
|
||||||
+ } while (0)
|
|
||||||
+
|
|
||||||
int
|
|
||||||
show_paths (char ** r, int * len, struct vectors * vecs, char * style,
|
|
||||||
int pretty)
|
|
||||||
@@ -802,8 +808,7 @@ cli_add_path (void * v, char ** reply, int * len, void * data)
|
|
||||||
}
|
|
||||||
return ev_add_path(pp, vecs, 1);
|
|
||||||
blacklisted:
|
|
||||||
- *reply = strdup("blacklisted\n");
|
|
||||||
- *len = strlen(*reply) + 1;
|
|
||||||
+ SET_REPLY_AND_LEN(reply, len, "blacklisted\n");
|
|
||||||
condlog(2, "%s: path blacklisted", param);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -824,23 +829,10 @@ cli_del_path (void * v, char ** reply, int * len, void * data)
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
ret = ev_remove_path(pp, vecs, 1);
|
|
||||||
- if (ret == REMOVE_PATH_DELAY) {
|
|
||||||
- *reply = strdup("delayed\n");
|
|
||||||
- if (*reply)
|
|
||||||
- *len = strlen(*reply) + 1;
|
|
||||||
- else {
|
|
||||||
- *len = 0;
|
|
||||||
- ret = REMOVE_PATH_FAILURE;
|
|
||||||
- }
|
|
||||||
- } else if (ret == REMOVE_PATH_MAP_ERROR) {
|
|
||||||
- *reply = strdup("map reload error. removed\n");
|
|
||||||
- if (*reply)
|
|
||||||
- *len = strlen(*reply) + 1;
|
|
||||||
- else {
|
|
||||||
- *len = 0;
|
|
||||||
- ret = REMOVE_PATH_FAILURE;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+ if (ret == REMOVE_PATH_DELAY)
|
|
||||||
+ SET_REPLY_AND_LEN(reply, len, "delayed\n");
|
|
||||||
+ else if (ret == REMOVE_PATH_MAP_ERROR)
|
|
||||||
+ SET_REPLY_AND_LEN(reply, len, "map reload error. removed\n");
|
|
||||||
return (ret == REMOVE_PATH_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -865,8 +857,7 @@ cli_add_map (void * v, char ** reply, int * len, void * data)
|
|
||||||
invalid = 1;
|
|
||||||
pthread_cleanup_pop(1);
|
|
||||||
if (invalid) {
|
|
||||||
- *reply = strdup("blacklisted\n");
|
|
||||||
- *len = strlen(*reply) + 1;
|
|
||||||
+ SET_REPLY_AND_LEN(reply, len, "blacklisted\n");
|
|
||||||
condlog(2, "%s: map blacklisted", param);
|
|
||||||
return 1;
|
|
||||||
}
|
|
35
0010-multipath-tools-remove-Compellent-maintainer.patch
Normal file
35
0010-multipath-tools-remove-Compellent-maintainer.patch
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
||||||
|
Date: Tue, 28 Sep 2021 22:39:17 +0200
|
||||||
|
Subject: [PATCH] multipath-tools: remove Compellent maintainer
|
||||||
|
|
||||||
|
e-mail was bounced: 550 5.1.1 User Unknown
|
||||||
|
|
||||||
|
Cc: Martin Wilck <mwilck@suse.com>
|
||||||
|
Cc: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
|
||||||
|
Cc: DM-DEVEL ML <dm-devel@redhat.com>
|
||||||
|
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
||||||
|
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
||||||
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
---
|
||||||
|
libmultipath/hwtable.c | 6 +-----
|
||||||
|
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
|
||||||
|
index 7fc5bc04..763982cd 100644
|
||||||
|
--- a/libmultipath/hwtable.c
|
||||||
|
+++ b/libmultipath/hwtable.c
|
||||||
|
@@ -361,11 +361,7 @@ static struct hwentry default_hw[] = {
|
||||||
|
.pgpolicy = MULTIBUS,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
- /*
|
||||||
|
- * SC Series, formerly Compellent
|
||||||
|
- *
|
||||||
|
- * Maintainer: Sean McGinnis <sean_mcginnis@dell.com>
|
||||||
|
- */
|
||||||
|
+ /* SC Series, formerly Compellent */
|
||||||
|
.vendor = "COMPELNT",
|
||||||
|
.product = "Compellent Vol",
|
||||||
|
.pgpolicy = GROUP_BY_PRIO,
|
@ -1,53 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Martin Wilck <mwilck@suse.com>
|
|
||||||
Date: Mon, 17 May 2021 22:45:05 +0200
|
|
||||||
Subject: [PATCH] multipathd: cli_getprkey(): fix return value
|
|
||||||
|
|
||||||
By setting (*reply)[19] = '\0', we always truncated a possible
|
|
||||||
":aptpl" suffix. Fix it, and use the return value of snprintf()
|
|
||||||
as length.
|
|
||||||
|
|
||||||
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
---
|
|
||||||
multipathd/cli_handlers.c | 17 ++++++++---------
|
|
||||||
1 file changed, 8 insertions(+), 9 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c
|
|
||||||
index 96064944..59d44b45 100644
|
|
||||||
--- a/multipathd/cli_handlers.c
|
|
||||||
+++ b/multipathd/cli_handlers.c
|
|
||||||
@@ -1540,7 +1540,7 @@ cli_getprkey(void * v, char ** reply, int * len, void * data)
|
|
||||||
struct multipath * mpp;
|
|
||||||
struct vectors * vecs = (struct vectors *)data;
|
|
||||||
char *mapname = get_keyparam(v, MAP);
|
|
||||||
- char *flagstr = "";
|
|
||||||
+ uint64_t key;
|
|
||||||
|
|
||||||
mapname = convert_dev(mapname, 0);
|
|
||||||
condlog(3, "%s: get persistent reservation key (operator)", mapname);
|
|
||||||
@@ -1553,17 +1553,16 @@ cli_getprkey(void * v, char ** reply, int * len, void * data)
|
|
||||||
if (!*reply)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
- if (!get_be64(mpp->reservation_key)) {
|
|
||||||
+ key = get_be64(mpp->reservation_key);
|
|
||||||
+ if (!key) {
|
|
||||||
sprintf(*reply, "none\n");
|
|
||||||
- *len = strlen(*reply) + 1;
|
|
||||||
+ *len = sizeof("none\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
- if (mpp->sa_flags & MPATH_F_APTPL_MASK)
|
|
||||||
- flagstr = ":aptpl";
|
|
||||||
- snprintf(*reply, 26, "0x%" PRIx64 "%s\n",
|
|
||||||
- get_be64(mpp->reservation_key), flagstr);
|
|
||||||
- (*reply)[19] = '\0';
|
|
||||||
- *len = strlen(*reply) + 1;
|
|
||||||
+
|
|
||||||
+ /* This snprintf() can't overflow - PRIx64 needs max 16 chars */
|
|
||||||
+ *len = snprintf(*reply, 26, "0x%" PRIx64 "%s\n", key,
|
|
||||||
+ mpp->sa_flags & MPATH_F_APTPL_MASK ? ":aptpl" : "") + 1;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
@ -1,64 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Martin Wilck <mwilck@suse.com>
|
|
||||||
Date: Mon, 17 May 2021 22:43:02 +0200
|
|
||||||
Subject: [PATCH] multipath-tools: enable -Wformat-overflow=2
|
|
||||||
|
|
||||||
Allow the compiler to catch possible format string overflows.
|
|
||||||
Two were found by gcc 10.
|
|
||||||
|
|
||||||
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
---
|
|
||||||
Makefile.inc | 3 ++-
|
|
||||||
libmultipath/discovery.c | 2 +-
|
|
||||||
libmultipath/print.c | 4 ++--
|
|
||||||
3 files changed, 5 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile.inc b/Makefile.inc
|
|
||||||
index f1e23131..91100a20 100644
|
|
||||||
--- a/Makefile.inc
|
|
||||||
+++ b/Makefile.inc
|
|
||||||
@@ -95,9 +95,10 @@ TEST_CC_OPTION = $(shell \
|
|
||||||
STACKPROT := $(call TEST_CC_OPTION,-fstack-protector-strong,-fstack-protector)
|
|
||||||
ERROR_DISCARDED_QUALIFIERS := $(call TEST_CC_OPTION,-Werror=discarded-qualifiers,)
|
|
||||||
WNOCLOBBERED := $(call TEST_CC_OPTION,-Wno-clobbered -Wno-error=clobbered,)
|
|
||||||
+WFORMATOVERFLOW := $(call TEST_CC_OPTION,-Wformat-overflow=2,)
|
|
||||||
|
|
||||||
OPTFLAGS := -O2 -g $(STACKPROT) --param=ssp-buffer-size=4
|
|
||||||
-WARNFLAGS := -Werror -Wall -Wextra -Wformat=2 -Werror=implicit-int \
|
|
||||||
+WARNFLAGS := -Werror -Wall -Wextra -Wformat=2 $(WFORMATOVERFLOW) -Werror=implicit-int \
|
|
||||||
-Werror=implicit-function-declaration -Werror=format-security \
|
|
||||||
$(WNOCLOBBERED) -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS)
|
|
||||||
CPPFLAGS := -Wp,-D_FORTIFY_SOURCE=2
|
|
||||||
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
|
||||||
index ec99a7aa..bfe2f56c 100644
|
|
||||||
--- a/libmultipath/discovery.c
|
|
||||||
+++ b/libmultipath/discovery.c
|
|
||||||
@@ -635,7 +635,7 @@ sysfs_set_rport_tmo(struct multipath *mpp, struct path *pp)
|
|
||||||
{
|
|
||||||
struct udev_device *rport_dev = NULL;
|
|
||||||
char value[16], *eptr;
|
|
||||||
- char rport_id[32];
|
|
||||||
+ char rport_id[42];
|
|
||||||
unsigned int tmo;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
diff --git a/libmultipath/print.c b/libmultipath/print.c
|
|
||||||
index 8151e11e..3c69bf48 100644
|
|
||||||
--- a/libmultipath/print.c
|
|
||||||
+++ b/libmultipath/print.c
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-/*
|
|
||||||
+ /*
|
|
||||||
* Copyright (c) 2005 Christophe Varoqui
|
|
||||||
*/
|
|
||||||
#include <stdio.h>
|
|
||||||
@@ -594,7 +594,7 @@ int
|
|
||||||
snprint_tgt_wwpn (char * buff, size_t len, const struct path * pp)
|
|
||||||
{
|
|
||||||
struct udev_device *rport_dev = NULL;
|
|
||||||
- char rport_id[32];
|
|
||||||
+ char rport_id[42];
|
|
||||||
const char *value = NULL;
|
|
||||||
int ret;
|
|
||||||
|
|
@ -19,10 +19,10 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|||||||
3 files changed, 10 insertions(+), 14 deletions(-)
|
3 files changed, 10 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
diff --git a/libmultipath/blacklist.c b/libmultipath/blacklist.c
|
diff --git a/libmultipath/blacklist.c b/libmultipath/blacklist.c
|
||||||
index 6c6a5979..785f5ee9 100644
|
index 4e315c97..1e463ef6 100644
|
||||||
--- a/libmultipath/blacklist.c
|
--- a/libmultipath/blacklist.c
|
||||||
+++ b/libmultipath/blacklist.c
|
+++ b/libmultipath/blacklist.c
|
||||||
@@ -201,9 +201,6 @@ setup_default_blist (struct config * conf)
|
@@ -202,9 +202,6 @@ setup_default_blist (struct config * conf)
|
||||||
if (store_ble(conf->blist_devnode, "!^(sd[a-z]|dasd[a-z]|nvme[0-9])", ORIGIN_DEFAULT))
|
if (store_ble(conf->blist_devnode, "!^(sd[a-z]|dasd[a-z]|nvme[0-9])", ORIGIN_DEFAULT))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ index 6c6a5979..785f5ee9 100644
|
|||||||
vector_foreach_slot (conf->hwtable, hwe, i) {
|
vector_foreach_slot (conf->hwtable, hwe, i) {
|
||||||
if (hwe->bl_product) {
|
if (hwe->bl_product) {
|
||||||
if (find_blacklist_device(conf->blist_device,
|
if (find_blacklist_device(conf->blist_device,
|
||||||
@@ -407,7 +404,8 @@ filter_property(const struct config *conf, struct udev_device *udev,
|
@@ -410,7 +407,8 @@ filter_property(const struct config *conf, struct udev_device *udev,
|
||||||
*uid_attribute != '\0';
|
*uid_attribute != '\0';
|
||||||
bool uid_attr_seen = false;
|
bool uid_attr_seen = false;
|
||||||
|
|
||||||
@ -43,10 +43,10 @@ index 6c6a5979..785f5ee9 100644
|
|||||||
udev_device_get_properties_list_entry(udev)) {
|
udev_device_get_properties_list_entry(udev)) {
|
||||||
|
|
||||||
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
|
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
|
||||||
index d6b8c7f6..689d09aa 100644
|
index c74129bd..dd9f4dc7 100644
|
||||||
--- a/multipath/multipath.conf.5
|
--- a/multipath/multipath.conf.5
|
||||||
+++ b/multipath/multipath.conf.5
|
+++ b/multipath/multipath.conf.5
|
||||||
@@ -1347,9 +1347,14 @@ keywords. Both are regular expressions. For a full description of these keywords
|
@@ -1351,9 +1351,14 @@ keywords. Both are regular expressions. For a full description of these keywords
|
||||||
Regular expression for an udev property. All
|
Regular expression for an udev property. All
|
||||||
devices that have matching udev properties will be excluded/included.
|
devices that have matching udev properties will be excluded/included.
|
||||||
The handling of the \fIproperty\fR keyword is special,
|
The handling of the \fIproperty\fR keyword is special,
|
||||||
@ -62,7 +62,7 @@ index d6b8c7f6..689d09aa 100644
|
|||||||
.
|
.
|
||||||
.RS
|
.RS
|
||||||
.PP
|
.PP
|
||||||
@@ -1360,10 +1365,6 @@ Blacklisting by missing properties is only applied to devices which do have the
|
@@ -1364,10 +1369,6 @@ Blacklisting by missing properties is only applied to devices which do have the
|
||||||
property specified by \fIuid_attribute\fR (e.g. \fIID_SERIAL\fR)
|
property specified by \fIuid_attribute\fR (e.g. \fIID_SERIAL\fR)
|
||||||
set. Previously, it was applied to every device, possibly causing devices to be
|
set. Previously, it was applied to every device, possibly causing devices to be
|
||||||
blacklisted because of temporary I/O error conditions.
|
blacklisted because of temporary I/O error conditions.
|
@ -1,347 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Martin Wilck <mwilck@suse.com>
|
|
||||||
Date: Mon, 17 May 2021 23:12:10 +0200
|
|
||||||
Subject: [PATCH] libdmmp: use KBUILD_BUILD_TIMESTAMP when building man pages
|
|
||||||
|
|
||||||
Use the latest commit timestamp of the "libdmmp.h" file as
|
|
||||||
the timestamp for the man pages. This should avoid spurious rebuilds
|
|
||||||
of the documentation.
|
|
||||||
|
|
||||||
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
---
|
|
||||||
libdmmp/Makefile | 2 ++
|
|
||||||
libdmmp/docs/man/dmmp_context_free.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_context_log_func_set.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_context_log_priority_get.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_context_log_priority_set.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_context_new.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_context_timeout_get.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_context_timeout_set.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_context_userdata_get.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_context_userdata_set.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_flush_mpath.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_last_error_msg.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_log_priority_str.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_mpath_array_free.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_mpath_array_get.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_mpath_kdev_name_get.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_mpath_name_get.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_mpath_wwid_get.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_path_array_get.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_path_blk_name_get.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_path_group_array_get.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_path_group_id_get.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_path_group_priority_get.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_path_group_selector_get.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_path_group_status_get.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_path_group_status_str.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_path_status_get.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_path_status_str.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_reconfig.3 | 2 +-
|
|
||||||
libdmmp/docs/man/dmmp_strerror.3 | 2 +-
|
|
||||||
30 files changed, 31 insertions(+), 29 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libdmmp/Makefile b/libdmmp/Makefile
|
|
||||||
index 764a0bc5..79b92fb2 100644
|
|
||||||
--- a/libdmmp/Makefile
|
|
||||||
+++ b/libdmmp/Makefile
|
|
||||||
@@ -76,6 +76,8 @@ docs/man/%.3.gz: docs/man/%.3
|
|
||||||
docs/man/dmmp_strerror.3: $(HEADERS)
|
|
||||||
TEMPFILE=$(shell mktemp); \
|
|
||||||
cat $^ | perl docs/doc-preclean.pl >$$TEMPFILE; \
|
|
||||||
+ LC_ALL=C \
|
|
||||||
+ KBUILD_BUILD_TIMESTAMP=`git log -n1 --pretty=%cd --date=iso -- $^` \
|
|
||||||
perl docs/kernel-doc -man $$TEMPFILE | \
|
|
||||||
perl docs/split-man.pl docs/man; \
|
|
||||||
rm -f $$TEMPFILE
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_context_free.3 b/libdmmp/docs/man/dmmp_context_free.3
|
|
||||||
index 0d26f42c..7c109e13 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_context_free.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_context_free.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_context_free" 3 "dmmp_context_free" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_context_free" 3 "dmmp_context_free" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_context_free \- Release the memory of struct dmmp_context.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_context_log_func_set.3 b/libdmmp/docs/man/dmmp_context_log_func_set.3
|
|
||||||
index 986793db..be311ecf 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_context_log_func_set.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_context_log_func_set.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_context_log_func_set" 3 "dmmp_context_log_func_set" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_context_log_func_set" 3 "dmmp_context_log_func_set" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_context_log_func_set \- Set log handler function.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_context_log_priority_get.3 b/libdmmp/docs/man/dmmp_context_log_priority_get.3
|
|
||||||
index 9a273a28..be383013 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_context_log_priority_get.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_context_log_priority_get.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_context_log_priority_get" 3 "dmmp_context_log_priority_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_context_log_priority_get" 3 "dmmp_context_log_priority_get" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_context_log_priority_get \- Get log priority.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_context_log_priority_set.3 b/libdmmp/docs/man/dmmp_context_log_priority_set.3
|
|
||||||
index 469c5a49..79e4d2e8 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_context_log_priority_set.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_context_log_priority_set.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_context_log_priority_set" 3 "dmmp_context_log_priority_set" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_context_log_priority_set" 3 "dmmp_context_log_priority_set" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_context_log_priority_set \- Set log priority.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_context_new.3 b/libdmmp/docs/man/dmmp_context_new.3
|
|
||||||
index 0eaeb00d..12505f91 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_context_new.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_context_new.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_context_new" 3 "dmmp_context_new" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_context_new" 3 "dmmp_context_new" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_context_new \- Create struct dmmp_context.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_context_timeout_get.3 b/libdmmp/docs/man/dmmp_context_timeout_get.3
|
|
||||||
index 1df27936..2ed825d5 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_context_timeout_get.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_context_timeout_get.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_context_timeout_get" 3 "dmmp_context_timeout_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_context_timeout_get" 3 "dmmp_context_timeout_get" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_context_timeout_get \- Get IPC timeout.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_context_timeout_set.3 b/libdmmp/docs/man/dmmp_context_timeout_set.3
|
|
||||||
index f3d77092..16bc9d99 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_context_timeout_set.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_context_timeout_set.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_context_timeout_set" 3 "dmmp_context_timeout_set" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_context_timeout_set" 3 "dmmp_context_timeout_set" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_context_timeout_set \- Set IPC timeout.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_context_userdata_get.3 b/libdmmp/docs/man/dmmp_context_userdata_get.3
|
|
||||||
index fb713d50..eff446c6 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_context_userdata_get.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_context_userdata_get.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_context_userdata_get" 3 "dmmp_context_userdata_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_context_userdata_get" 3 "dmmp_context_userdata_get" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_context_userdata_get \- Get user data pointer.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_context_userdata_set.3 b/libdmmp/docs/man/dmmp_context_userdata_set.3
|
|
||||||
index c5bf63f3..d7be869f 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_context_userdata_set.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_context_userdata_set.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_context_userdata_set" 3 "dmmp_context_userdata_set" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_context_userdata_set" 3 "dmmp_context_userdata_set" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_context_userdata_set \- Set user data pointer.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_flush_mpath.3 b/libdmmp/docs/man/dmmp_flush_mpath.3
|
|
||||||
index cdfd5266..359607ed 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_flush_mpath.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_flush_mpath.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_flush_mpath" 3 "dmmp_flush_mpath" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_flush_mpath" 3 "dmmp_flush_mpath" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_flush_mpath \- Flush specified multipath device map if unused.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_last_error_msg.3 b/libdmmp/docs/man/dmmp_last_error_msg.3
|
|
||||||
index 20acbc6a..378c55a5 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_last_error_msg.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_last_error_msg.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_last_error_msg" 3 "dmmp_last_error_msg" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_last_error_msg" 3 "dmmp_last_error_msg" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_last_error_msg \- Retrieves the last error message.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_log_priority_str.3 b/libdmmp/docs/man/dmmp_log_priority_str.3
|
|
||||||
index 3b5f8284..b2761602 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_log_priority_str.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_log_priority_str.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_log_priority_str" 3 "dmmp_log_priority_str" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_log_priority_str" 3 "dmmp_log_priority_str" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_log_priority_str \- Convert log priority to string.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_mpath_array_free.3 b/libdmmp/docs/man/dmmp_mpath_array_free.3
|
|
||||||
index 8c294e0d..0514a66f 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_mpath_array_free.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_mpath_array_free.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_mpath_array_free" 3 "dmmp_mpath_array_free" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_mpath_array_free" 3 "dmmp_mpath_array_free" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_mpath_array_free \- Free 'struct dmmp_mpath' pointer array.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_mpath_array_get.3 b/libdmmp/docs/man/dmmp_mpath_array_get.3
|
|
||||||
index e211db42..8b0e5b53 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_mpath_array_get.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_mpath_array_get.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_mpath_array_get" 3 "dmmp_mpath_array_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_mpath_array_get" 3 "dmmp_mpath_array_get" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_mpath_array_get \- Query all existing multipath devices.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_mpath_kdev_name_get.3 b/libdmmp/docs/man/dmmp_mpath_kdev_name_get.3
|
|
||||||
index e802fe6d..ddead551 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_mpath_kdev_name_get.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_mpath_kdev_name_get.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_mpath_kdev_name_get" 3 "dmmp_mpath_kdev_name_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_mpath_kdev_name_get" 3 "dmmp_mpath_kdev_name_get" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_mpath_kdev_name_get \- Retrieve kernel DEVNAME of certain mpath.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_mpath_name_get.3 b/libdmmp/docs/man/dmmp_mpath_name_get.3
|
|
||||||
index d70579e5..2b0027e5 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_mpath_name_get.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_mpath_name_get.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_mpath_name_get" 3 "dmmp_mpath_name_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_mpath_name_get" 3 "dmmp_mpath_name_get" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_mpath_name_get \- Retrieve name(alias) of certain mpath.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_mpath_wwid_get.3 b/libdmmp/docs/man/dmmp_mpath_wwid_get.3
|
|
||||||
index 3d060e92..b8e9e7d8 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_mpath_wwid_get.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_mpath_wwid_get.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_mpath_wwid_get" 3 "dmmp_mpath_wwid_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_mpath_wwid_get" 3 "dmmp_mpath_wwid_get" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_mpath_wwid_get \- Retrieve WWID of certain mpath.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_path_array_get.3 b/libdmmp/docs/man/dmmp_path_array_get.3
|
|
||||||
index 53340b3d..21f486be 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_path_array_get.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_path_array_get.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_path_array_get" 3 "dmmp_path_array_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_path_array_get" 3 "dmmp_path_array_get" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_path_array_get \- Retrieve path pointer array.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_path_blk_name_get.3 b/libdmmp/docs/man/dmmp_path_blk_name_get.3
|
|
||||||
index da5f9f03..5938f0e7 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_path_blk_name_get.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_path_blk_name_get.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_path_blk_name_get" 3 "dmmp_path_blk_name_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_path_blk_name_get" 3 "dmmp_path_blk_name_get" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_path_blk_name_get \- Retrieve block name.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_path_group_array_get.3 b/libdmmp/docs/man/dmmp_path_group_array_get.3
|
|
||||||
index 6eee4a2b..ca3187cb 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_path_group_array_get.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_path_group_array_get.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_path_group_array_get" 3 "dmmp_path_group_array_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_path_group_array_get" 3 "dmmp_path_group_array_get" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_path_group_array_get \- Retrieve path groups pointer array.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_path_group_id_get.3 b/libdmmp/docs/man/dmmp_path_group_id_get.3
|
|
||||||
index 4f07b536..a84f31f0 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_path_group_id_get.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_path_group_id_get.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_path_group_id_get" 3 "dmmp_path_group_id_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_path_group_id_get" 3 "dmmp_path_group_id_get" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_path_group_id_get \- Retrieve path group ID.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_path_group_priority_get.3 b/libdmmp/docs/man/dmmp_path_group_priority_get.3
|
|
||||||
index a48b2704..1cda8af3 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_path_group_priority_get.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_path_group_priority_get.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_path_group_priority_get" 3 "dmmp_path_group_priority_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_path_group_priority_get" 3 "dmmp_path_group_priority_get" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_path_group_priority_get \- Retrieve path group priority.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_path_group_selector_get.3 b/libdmmp/docs/man/dmmp_path_group_selector_get.3
|
|
||||||
index 407b3f41..f55477bb 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_path_group_selector_get.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_path_group_selector_get.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_path_group_selector_get" 3 "dmmp_path_group_selector_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_path_group_selector_get" 3 "dmmp_path_group_selector_get" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_path_group_selector_get \- Retrieve path group selector.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_path_group_status_get.3 b/libdmmp/docs/man/dmmp_path_group_status_get.3
|
|
||||||
index a81aeb3a..53e68b8e 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_path_group_status_get.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_path_group_status_get.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_path_group_status_get" 3 "dmmp_path_group_status_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_path_group_status_get" 3 "dmmp_path_group_status_get" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_path_group_status_get \- Retrieve path group status.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_path_group_status_str.3 b/libdmmp/docs/man/dmmp_path_group_status_str.3
|
|
||||||
index e4a9f74b..98f877a4 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_path_group_status_str.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_path_group_status_str.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_path_group_status_str" 3 "dmmp_path_group_status_str" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_path_group_status_str" 3 "dmmp_path_group_status_str" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_path_group_status_str \- Convert path group status to string.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_path_status_get.3 b/libdmmp/docs/man/dmmp_path_status_get.3
|
|
||||||
index 025cfee5..baa4437d 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_path_status_get.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_path_status_get.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_path_status_get" 3 "dmmp_path_status_get" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_path_status_get" 3 "dmmp_path_status_get" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_path_status_get \- Retrieve the path status.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_path_status_str.3 b/libdmmp/docs/man/dmmp_path_status_str.3
|
|
||||||
index 3944d399..425e472a 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_path_status_str.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_path_status_str.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_path_status_str" 3 "dmmp_path_status_str" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_path_status_str" 3 "dmmp_path_status_str" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_path_status_str \- Convert path status to string.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_reconfig.3 b/libdmmp/docs/man/dmmp_reconfig.3
|
|
||||||
index a743e308..36bd5041 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_reconfig.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_reconfig.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_reconfig" 3 "dmmp_reconfig" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_reconfig" 3 "dmmp_reconfig" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_reconfig \- Instruct multipathd daemon to do reconfiguration.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
diff --git a/libdmmp/docs/man/dmmp_strerror.3 b/libdmmp/docs/man/dmmp_strerror.3
|
|
||||||
index 4d753d36..3acd9c9d 100644
|
|
||||||
--- a/libdmmp/docs/man/dmmp_strerror.3
|
|
||||||
+++ b/libdmmp/docs/man/dmmp_strerror.3
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-.TH "dmmp_strerror" 3 "dmmp_strerror" "March 2021" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
+.TH "dmmp_strerror" 3 "dmmp_strerror" "March 2018" "Device Mapper Multipath API - libdmmp Manual"
|
|
||||||
.SH NAME
|
|
||||||
dmmp_strerror \- Convert error code to string.
|
|
||||||
.SH SYNOPSIS
|
|
@ -1,52 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
|
||||||
Date: Sat, 5 Jun 2021 01:01:45 +0200
|
|
||||||
Subject: [PATCH] multipath-tools: add info about HPE Alletra 6000 and 9000
|
|
||||||
|
|
||||||
Cc: Martin Wilck <mwilck@suse.com>
|
|
||||||
Cc: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
|
|
||||||
Cc: DM-DEVEL ML <dm-devel@redhat.com>
|
|
||||||
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
|
||||||
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
---
|
|
||||||
README.alua | 2 +-
|
|
||||||
libmultipath/hwtable.c | 4 ++--
|
|
||||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/README.alua b/README.alua
|
|
||||||
index b15eb487..5d2b1c64 100644
|
|
||||||
--- a/README.alua
|
|
||||||
+++ b/README.alua
|
|
||||||
@@ -6,7 +6,7 @@ To enable ALUA, the following options should be changed:
|
|
||||||
- EMC CLARiiON/VNX:
|
|
||||||
"Failover Mode" should be changed to "4" or "Active-Active mode(ALUA)-failover mode 4"
|
|
||||||
|
|
||||||
-- HPE 3PAR:
|
|
||||||
+- HPE 3PAR, Primera, and Alletra 9000:
|
|
||||||
"Host:" should be changed to "Generic-ALUA Persona 2 (UARepLun, SESLun, ALUA)".
|
|
||||||
|
|
||||||
- Promise VTrak/Vess:
|
|
||||||
diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
|
|
||||||
index 58fa7387..e884d8c7 100644
|
|
||||||
--- a/libmultipath/hwtable.c
|
|
||||||
+++ b/libmultipath/hwtable.c
|
|
||||||
@@ -107,7 +107,7 @@ static struct hwentry default_hw[] = {
|
|
||||||
* HPE
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
- /* 3PAR / Primera */
|
|
||||||
+ /* 3PAR / Primera / Alletra 9000 */
|
|
||||||
.vendor = "3PARdata",
|
|
||||||
.product = "VV",
|
|
||||||
.pgpolicy = GROUP_BY_PRIO,
|
|
||||||
@@ -225,7 +225,7 @@ static struct hwentry default_hw[] = {
|
|
||||||
.prio_name = PRIO_ALUA,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
- /* Nimble Storage */
|
|
||||||
+ /* Nimble Storage / HPE Alletra 6000 */
|
|
||||||
.vendor = "Nimble",
|
|
||||||
.product = "Server",
|
|
||||||
.hwhandler = "1 alua",
|
|
@ -1,32 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Utkarsh Gupta <utkarsh.gupta@canonical.com>
|
|
||||||
Date: Mon, 7 Jun 2021 20:08:24 +0530
|
|
||||||
Subject: [PATCH] multipathd: don't start in containers
|
|
||||||
|
|
||||||
Do not attempt to start multipath-tools in containers,
|
|
||||||
should switch for on-demand udev/socket based
|
|
||||||
activation in the future.
|
|
||||||
|
|
||||||
Originally reported as:
|
|
||||||
https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/1823093
|
|
||||||
|
|
||||||
Author: Dimitri John Ledkov <xnox@ubuntu.com>
|
|
||||||
Co-Author: Utkarsh Gupta <utkarsh@debian.org>
|
|
||||||
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
---
|
|
||||||
multipathd/multipathd.service | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/multipathd/multipathd.service b/multipathd/multipathd.service
|
|
||||||
index 7d547fa7..0b2ac814 100644
|
|
||||||
--- a/multipathd/multipathd.service
|
|
||||||
+++ b/multipathd/multipathd.service
|
|
||||||
@@ -8,6 +8,7 @@ DefaultDependencies=no
|
|
||||||
Conflicts=shutdown.target
|
|
||||||
ConditionKernelCommandLine=!nompath
|
|
||||||
ConditionKernelCommandLine=!multipath=off
|
|
||||||
+ConditionVirtualization=!container
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=notify
|
|
@ -1,59 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Martin Wilck <mwilck@suse.com>
|
|
||||||
Date: Thu, 20 May 2021 21:26:01 +0200
|
|
||||||
Subject: [PATCH] libmultipath: fix build without LIBDM_API_DEFERRED
|
|
||||||
|
|
||||||
Build fails on distributions that don't support DM_DEFERRED_REMOVE
|
|
||||||
(libdevmapper < 1.02.89). Fix it.
|
|
||||||
|
|
||||||
Resolves: https://github.com/opensvc/multipath-tools/issues/7
|
|
||||||
Tested-by: Paul Menzel <pmenzel@molgen.mpg.de>
|
|
||||||
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
---
|
|
||||||
libmultipath/devmapper.c | 11 ++++++++---
|
|
||||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
|
|
||||||
index 095cbc0c..47a6d60e 100644
|
|
||||||
--- a/libmultipath/devmapper.c
|
|
||||||
+++ b/libmultipath/devmapper.c
|
|
||||||
@@ -49,6 +49,9 @@ static int dm_conf_verbosity;
|
|
||||||
|
|
||||||
#ifdef LIBDM_API_DEFERRED
|
|
||||||
static int dm_cancel_remove_partmaps(const char * mapname);
|
|
||||||
+#define __DR_UNUSED__ /* empty */
|
|
||||||
+#else
|
|
||||||
+#define __DR_UNUSED__ __attribute__((unused))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int do_foreach_partmaps(const char * mapname,
|
|
||||||
@@ -384,7 +387,8 @@ libmp_dm_task_create(int task)
|
|
||||||
#define do_deferred(x) ((x) == DEFERRED_REMOVE_ON || (x) == DEFERRED_REMOVE_IN_PROGRESS)
|
|
||||||
|
|
||||||
static int
|
|
||||||
-dm_simplecmd (int task, const char *name, int no_flush, int need_sync, uint16_t udev_flags, int deferred_remove) {
|
|
||||||
+dm_simplecmd (int task, const char *name, int no_flush, int need_sync,
|
|
||||||
+ uint16_t udev_flags, int deferred_remove __DR_UNUSED__) {
|
|
||||||
int r = 0;
|
|
||||||
int udev_wait_flag = ((need_sync || udev_flags) &&
|
|
||||||
(task == DM_DEVICE_RESUME ||
|
|
||||||
@@ -1122,7 +1126,8 @@ dm_flush_map_nopaths(const char * mapname, int deferred_remove)
|
|
||||||
#else
|
|
||||||
|
|
||||||
int
|
|
||||||
-dm_flush_map_nopaths(const char * mapname, int deferred_remove)
|
|
||||||
+dm_flush_map_nopaths(const char * mapname,
|
|
||||||
+ int deferred_remove __attribute__((unused)))
|
|
||||||
{
|
|
||||||
return _dm_flush_map(mapname, 1, 0, 0, 0);
|
|
||||||
}
|
|
||||||
@@ -1573,7 +1578,7 @@ dm_cancel_deferred_remove (struct multipath *mpp)
|
|
||||||
#else
|
|
||||||
|
|
||||||
int
|
|
||||||
-dm_cancel_deferred_remove (struct multipath *mpp)
|
|
||||||
+dm_cancel_deferred_remove (struct multipath *mpp __attribute__((unused)))
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,128 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Martin Wilck <mwilck@suse.com>
|
|
||||||
Date: Wed, 30 Jun 2021 21:51:53 +0200
|
|
||||||
Subject: [PATCH] libmultipath: use uint64_t for sg_id.lun
|
|
||||||
|
|
||||||
SCSI LUNs are 64bit unsigned integers, and have been exposed as such by
|
|
||||||
the kernel for years. Storage using the full 8 bytes is fortunately rare.
|
|
||||||
Still, we should handle this properly.
|
|
||||||
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
---
|
|
||||||
libmultipath/discovery.c | 10 +++++-----
|
|
||||||
libmultipath/print.c | 2 +-
|
|
||||||
libmultipath/prioritizers/weightedpath.c | 2 +-
|
|
||||||
libmultipath/structs.c | 2 +-
|
|
||||||
libmultipath/structs.h | 4 +++-
|
|
||||||
5 files changed, 11 insertions(+), 9 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
|
||||||
index bfe2f56c..e9f5703c 100644
|
|
||||||
--- a/libmultipath/discovery.c
|
|
||||||
+++ b/libmultipath/discovery.c
|
|
||||||
@@ -1427,7 +1427,7 @@ scsi_sysfs_pathinfo (struct path *pp, const struct _vector *hwtable)
|
|
||||||
attr_path = udev_device_get_sysname(parent);
|
|
||||||
if (!attr_path)
|
|
||||||
break;
|
|
||||||
- if (sscanf(attr_path, "%i:%i:%i:%i",
|
|
||||||
+ if (sscanf(attr_path, "%i:%i:%i:%" SCNu64,
|
|
||||||
&pp->sg_id.host_no,
|
|
||||||
&pp->sg_id.channel,
|
|
||||||
&pp->sg_id.scsi_id,
|
|
||||||
@@ -1462,7 +1462,7 @@ scsi_sysfs_pathinfo (struct path *pp, const struct _vector *hwtable)
|
|
||||||
/*
|
|
||||||
* host / bus / target / lun
|
|
||||||
*/
|
|
||||||
- condlog(3, "%s: h:b:t:l = %i:%i:%i:%i",
|
|
||||||
+ condlog(3, "%s: h:b:t:l = %i:%i:%i:%" PRIu64,
|
|
||||||
pp->dev,
|
|
||||||
pp->sg_id.host_no,
|
|
||||||
pp->sg_id.channel,
|
|
||||||
@@ -1577,7 +1577,7 @@ ccw_sysfs_pathinfo (struct path *pp, const struct _vector *hwtable)
|
|
||||||
&pp->sg_id.host_no,
|
|
||||||
&pp->sg_id.channel,
|
|
||||||
&pp->sg_id.scsi_id) == 3) {
|
|
||||||
- condlog(3, "%s: h:b:t:l = %i:%i:%i:%i",
|
|
||||||
+ condlog(3, "%s: h:b:t:l = %i:%i:%i:%" PRIu64,
|
|
||||||
pp->dev,
|
|
||||||
pp->sg_id.host_no,
|
|
||||||
pp->sg_id.channel,
|
|
||||||
@@ -1636,7 +1636,7 @@ cciss_sysfs_pathinfo (struct path *pp, const struct _vector *hwtable)
|
|
||||||
*/
|
|
||||||
pp->sg_id.lun = 0;
|
|
||||||
pp->sg_id.channel = 0;
|
|
||||||
- condlog(3, "%s: h:b:t:l = %i:%i:%i:%i",
|
|
||||||
+ condlog(3, "%s: h:b:t:l = %i:%i:%i:%" PRIu64,
|
|
||||||
pp->dev,
|
|
||||||
pp->sg_id.host_no,
|
|
||||||
pp->sg_id.channel,
|
|
||||||
@@ -1815,7 +1815,7 @@ scsi_ioctl_pathinfo (struct path * pp, int mask)
|
|
||||||
attr_path = udev_device_get_sysname(parent);
|
|
||||||
if (!attr_path)
|
|
||||||
break;
|
|
||||||
- if (sscanf(attr_path, "%i:%i:%i:%i",
|
|
||||||
+ if (sscanf(attr_path, "%i:%i:%i:%" SCNu64,
|
|
||||||
&pp->sg_id.host_no,
|
|
||||||
&pp->sg_id.channel,
|
|
||||||
&pp->sg_id.scsi_id,
|
|
||||||
diff --git a/libmultipath/print.c b/libmultipath/print.c
|
|
||||||
index 3c69bf48..29ce499d 100644
|
|
||||||
--- a/libmultipath/print.c
|
|
||||||
+++ b/libmultipath/print.c
|
|
||||||
@@ -392,7 +392,7 @@ snprint_hcil (char * buff, size_t len, const struct path * pp)
|
|
||||||
if (!pp || pp->sg_id.host_no < 0)
|
|
||||||
return snprintf(buff, len, "#:#:#:#");
|
|
||||||
|
|
||||||
- return snprintf(buff, len, "%i:%i:%i:%i",
|
|
||||||
+ return snprintf(buff, len, "%i:%i:%i:%" PRIu64,
|
|
||||||
pp->sg_id.host_no,
|
|
||||||
pp->sg_id.channel,
|
|
||||||
pp->sg_id.scsi_id,
|
|
||||||
diff --git a/libmultipath/prioritizers/weightedpath.c b/libmultipath/prioritizers/weightedpath.c
|
|
||||||
index 916970df..650088b4 100644
|
|
||||||
--- a/libmultipath/prioritizers/weightedpath.c
|
|
||||||
+++ b/libmultipath/prioritizers/weightedpath.c
|
|
||||||
@@ -101,7 +101,7 @@ int prio_path_weight(struct path *pp, char *prio_args)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!strcmp(regex, HBTL)) {
|
|
||||||
- sprintf(path, "%d:%d:%d:%d", pp->sg_id.host_no,
|
|
||||||
+ sprintf(path, "%d:%d:%d:%" PRIu64, pp->sg_id.host_no,
|
|
||||||
pp->sg_id.channel, pp->sg_id.scsi_id, pp->sg_id.lun);
|
|
||||||
} else if (!strcmp(regex, DEV_NAME)) {
|
|
||||||
strcpy(path, pp->dev);
|
|
||||||
diff --git a/libmultipath/structs.c b/libmultipath/structs.c
|
|
||||||
index 8751fc2b..6e5a1038 100644
|
|
||||||
--- a/libmultipath/structs.c
|
|
||||||
+++ b/libmultipath/structs.c
|
|
||||||
@@ -96,7 +96,7 @@ alloc_path (void)
|
|
||||||
pp->sg_id.host_no = -1;
|
|
||||||
pp->sg_id.channel = -1;
|
|
||||||
pp->sg_id.scsi_id = -1;
|
|
||||||
- pp->sg_id.lun = -1;
|
|
||||||
+ pp->sg_id.lun = SCSI_INVALID_LUN;
|
|
||||||
pp->sg_id.proto_id = SCSI_PROTOCOL_UNSPEC;
|
|
||||||
pp->fd = -1;
|
|
||||||
pp->tpgs = TPGS_UNDEF;
|
|
||||||
diff --git a/libmultipath/structs.h b/libmultipath/structs.h
|
|
||||||
index c8447e56..c52bcee1 100644
|
|
||||||
--- a/libmultipath/structs.h
|
|
||||||
+++ b/libmultipath/structs.h
|
|
||||||
@@ -178,6 +178,8 @@ enum scsi_protocol {
|
|
||||||
SCSI_PROTOCOL_UNSPEC = 0xf, /* No specific protocol */
|
|
||||||
};
|
|
||||||
|
|
||||||
+#define SCSI_INVALID_LUN ~0ULL
|
|
||||||
+
|
|
||||||
enum no_undef_states {
|
|
||||||
NU_NO = -1,
|
|
||||||
NU_UNDEF = 0,
|
|
||||||
@@ -258,7 +260,7 @@ struct sg_id {
|
|
||||||
int host_no;
|
|
||||||
int channel;
|
|
||||||
int scsi_id;
|
|
||||||
- int lun;
|
|
||||||
+ uint64_t lun;
|
|
||||||
short h_cmd_per_lun;
|
|
||||||
short d_queue_depth;
|
|
||||||
enum scsi_protocol proto_id;
|
|
@ -20,7 +20,7 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|||||||
3 files changed, 59 insertions(+), 3 deletions(-)
|
3 files changed, 59 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
diff --git a/multipath/main.c b/multipath/main.c
|
diff --git a/multipath/main.c b/multipath/main.c
|
||||||
index 33377147..85e4481d 100644
|
index 65ece830..748e7902 100644
|
||||||
--- a/multipath/main.c
|
--- a/multipath/main.c
|
||||||
+++ b/multipath/main.c
|
+++ b/multipath/main.c
|
||||||
@@ -122,7 +122,7 @@ usage (char * progname)
|
@@ -122,7 +122,7 @@ usage (char * progname)
|
||||||
@ -41,7 +41,7 @@ index 33377147..85e4481d 100644
|
|||||||
" -c check if a device should be a path in a multipath device\n"
|
" -c check if a device should be a path in a multipath device\n"
|
||||||
" -C check if a multipath device has usable paths\n"
|
" -C check if a multipath device has usable paths\n"
|
||||||
" -q allow queue_if_no_path when multipathd is not running\n"
|
" -q allow queue_if_no_path when multipathd is not running\n"
|
||||||
@@ -455,6 +457,50 @@ static void cleanup_vecs(void)
|
@@ -450,6 +452,50 @@ static void cleanup_vecs(void)
|
||||||
free_pathvec(vecs.pathvec, FREE_PATHS);
|
free_pathvec(vecs.pathvec, FREE_PATHS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ index 33377147..85e4481d 100644
|
|||||||
static int
|
static int
|
||||||
configure (struct config *conf, enum mpath_cmds cmd,
|
configure (struct config *conf, enum mpath_cmds cmd,
|
||||||
enum devtypes dev_type, char *devpath)
|
enum devtypes dev_type, char *devpath)
|
||||||
@@ -833,7 +879,7 @@ main (int argc, char *argv[])
|
@@ -838,7 +884,7 @@ main (int argc, char *argv[])
|
||||||
conf->retrigger_tries = 0;
|
conf->retrigger_tries = 0;
|
||||||
conf->force_sync = 1;
|
conf->force_sync = 1;
|
||||||
atexit(cleanup_vecs);
|
atexit(cleanup_vecs);
|
||||||
@ -101,7 +101,7 @@ index 33377147..85e4481d 100644
|
|||||||
switch(arg) {
|
switch(arg) {
|
||||||
case 1: printf("optarg : %s\n",optarg);
|
case 1: printf("optarg : %s\n",optarg);
|
||||||
break;
|
break;
|
||||||
@@ -910,6 +956,10 @@ main (int argc, char *argv[])
|
@@ -915,6 +961,10 @@ main (int argc, char *argv[])
|
||||||
case 'T':
|
case 'T':
|
||||||
cmd = CMD_DUMP_CONFIG;
|
cmd = CMD_DUMP_CONFIG;
|
||||||
break;
|
break;
|
@ -1,115 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
|
||||||
Date: Sat, 22 May 2021 21:17:36 +0200
|
|
||||||
Subject: [PATCH] multipath-tools: Remove trailing/leading whitespaces
|
|
||||||
|
|
||||||
Cc: Martin Wilck <mwilck@suse.com>
|
|
||||||
Cc: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
|
|
||||||
Cc: DM-DEVEL ML <dm-devel@redhat.com>
|
|
||||||
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
|
||||||
Reviewed-by: Martin Wilck <mwilck@suse.com>"
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
---
|
|
||||||
Makefile.inc | 2 +-
|
|
||||||
libmultipath/configure.c | 2 +-
|
|
||||||
libmultipath/devmapper.c | 4 ++--
|
|
||||||
libmultipath/sysfs.c | 2 +-
|
|
||||||
multipath/multipath.8 | 2 +-
|
|
||||||
multipathd/cli_handlers.c | 2 +-
|
|
||||||
multipathd/main.c | 2 +-
|
|
||||||
7 files changed, 8 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile.inc b/Makefile.inc
|
|
||||||
index 91100a20..d0ec9b44 100644
|
|
||||||
--- a/Makefile.inc
|
|
||||||
+++ b/Makefile.inc
|
|
||||||
@@ -101,7 +101,7 @@ OPTFLAGS := -O2 -g $(STACKPROT) --param=ssp-buffer-size=4
|
|
||||||
WARNFLAGS := -Werror -Wall -Wextra -Wformat=2 $(WFORMATOVERFLOW) -Werror=implicit-int \
|
|
||||||
-Werror=implicit-function-declaration -Werror=format-security \
|
|
||||||
$(WNOCLOBBERED) -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS)
|
|
||||||
-CPPFLAGS := -Wp,-D_FORTIFY_SOURCE=2
|
|
||||||
+CPPFLAGS := -Wp,-D_FORTIFY_SOURCE=2
|
|
||||||
CFLAGS := --std=gnu99 $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe \
|
|
||||||
-DBIN_DIR=\"$(bindir)\" -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" \
|
|
||||||
-MMD -MP
|
|
||||||
diff --git a/libmultipath/configure.c b/libmultipath/configure.c
|
|
||||||
index 6ca1f4bb..a6ae3359 100644
|
|
||||||
--- a/libmultipath/configure.c
|
|
||||||
+++ b/libmultipath/configure.c
|
|
||||||
@@ -397,7 +397,7 @@ int setup_map(struct multipath *mpp, char *params, int params_size,
|
|
||||||
start_io_err_stat_thread(vecs);
|
|
||||||
|
|
||||||
n_paths = VECTOR_SIZE(mpp->paths);
|
|
||||||
- /*
|
|
||||||
+ /*
|
|
||||||
* assign paths to path groups -- start with no groups and all paths
|
|
||||||
* in mpp->paths
|
|
||||||
*/
|
|
||||||
diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
|
|
||||||
index 47a6d60e..945e625b 100644
|
|
||||||
--- a/libmultipath/devmapper.c
|
|
||||||
+++ b/libmultipath/devmapper.c
|
|
||||||
@@ -602,8 +602,8 @@ int dm_addmap_reload(struct multipath *mpp, char *params, int flush)
|
|
||||||
return r;
|
|
||||||
|
|
||||||
/* If the resume failed, dm will leave the device suspended, and
|
|
||||||
- * drop the new table, so doing a second resume will try using
|
|
||||||
- * the original table */
|
|
||||||
+ * drop the new table, so doing a second resume will try using
|
|
||||||
+ * the original table */
|
|
||||||
if (dm_is_suspended(mpp->alias))
|
|
||||||
dm_simplecmd(DM_DEVICE_RESUME, mpp->alias, !flush, 1,
|
|
||||||
udev_flags, 0);
|
|
||||||
diff --git a/libmultipath/sysfs.c b/libmultipath/sysfs.c
|
|
||||||
index 7a2af1ea..9ff145f2 100644
|
|
||||||
--- a/libmultipath/sysfs.c
|
|
||||||
+++ b/libmultipath/sysfs.c
|
|
||||||
@@ -358,7 +358,7 @@ bool sysfs_is_multipathed(struct path *pp, bool set_wwid)
|
|
||||||
strchop(pp->wwid);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- } else if (nr < 0)
|
|
||||||
+ } else if (nr < 0)
|
|
||||||
condlog(1, "%s: error reading from %s: %m",
|
|
||||||
__func__, pathbuf);
|
|
||||||
|
|
||||||
diff --git a/multipath/multipath.8 b/multipath/multipath.8
|
|
||||||
index 5b29a5d9..17df59f5 100644
|
|
||||||
--- a/multipath/multipath.8
|
|
||||||
+++ b/multipath/multipath.8
|
|
||||||
@@ -225,7 +225,7 @@ Dry run, do not create or update devmaps.
|
|
||||||
.TP
|
|
||||||
.B \-e
|
|
||||||
Enable all foreign libraries. This overrides the
|
|
||||||
-.I enable_foreign
|
|
||||||
+.I enable_foreign
|
|
||||||
option from \fBmultipath.conf(5)\fR.
|
|
||||||
.
|
|
||||||
.TP
|
|
||||||
diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c
|
|
||||||
index 59d44b45..d70e1dbc 100644
|
|
||||||
--- a/multipathd/cli_handlers.c
|
|
||||||
+++ b/multipathd/cli_handlers.c
|
|
||||||
@@ -1215,7 +1215,7 @@ cli_reconfigure(void * v, char ** reply, int * len, void * data)
|
|
||||||
|
|
||||||
condlog(2, "reconfigure (operator)");
|
|
||||||
|
|
||||||
- rc = set_config_state(DAEMON_CONFIGURE);
|
|
||||||
+ rc = set_config_state(DAEMON_CONFIGURE);
|
|
||||||
if (rc == ETIMEDOUT) {
|
|
||||||
condlog(2, "timeout starting reconfiguration");
|
|
||||||
return 1;
|
|
||||||
diff --git a/multipathd/main.c b/multipathd/main.c
|
|
||||||
index 2251e02c..bdd629e7 100644
|
|
||||||
--- a/multipathd/main.c
|
|
||||||
+++ b/multipathd/main.c
|
|
||||||
@@ -2014,7 +2014,7 @@ static int check_path_reinstate_state(struct path * pp) {
|
|
||||||
|
|
||||||
/* If path became failed again or continue failed, should reset
|
|
||||||
* path san_path_err_forget_rate and path dis_reinstate_time to
|
|
||||||
- * start a new stable check.
|
|
||||||
+ * start a new stable check.
|
|
||||||
*/
|
|
||||||
if ((pp->state != PATH_UP) && (pp->state != PATH_GHOST) &&
|
|
||||||
(pp->state != PATH_DELAYED)) {
|
|
@ -1,63 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
|
||||||
Date: Mon, 5 Apr 2021 00:12:58 +0200
|
|
||||||
Subject: [PATCH] multipath-tools: make HUAWEI/XSG1 config work with alua and
|
|
||||||
multibus
|
|
||||||
|
|
||||||
And add recommended no_path_retry and pgfailback values.
|
|
||||||
|
|
||||||
Info from:
|
|
||||||
- RHEL https://download.huawei.com/edownload/e/download.do?actionFlag=download&nid=EDOC1100113070&partNo=6001&mid=SUPE_DOC&_t=1612885511000
|
|
||||||
- SLES https://download.huawei.com/edownload/e/download.do?actionFlag=download&nid=EDOC1100117892&partNo=6001&mid=SUPE_DOC&_t=1612885538000
|
|
||||||
|
|
||||||
- without HyperMetro:
|
|
||||||
vendor "HUAWEI"
|
|
||||||
product "XSG1"
|
|
||||||
path_grouping_policy multibus
|
|
||||||
no_path_retry 15
|
|
||||||
|
|
||||||
- with HyperMetro:
|
|
||||||
vendor "HUAWEI"
|
|
||||||
product "XSG1"
|
|
||||||
path_grouping_policy group_by_prio
|
|
||||||
prio alua
|
|
||||||
failback immediate
|
|
||||||
no_path_retry 15
|
|
||||||
|
|
||||||
ALUA is only used with HyperMetro(cluster of two arrays).
|
|
||||||
|
|
||||||
Suggested-by: Martin Wilck <mwilck@suse.com>
|
|
||||||
Cc: Zhouweigang (Jack) <zhouweigang09@huawei.com>
|
|
||||||
Cc: Zou Ming <zouming.zouming@huawei.com>
|
|
||||||
Cc: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Cc: Martin Wilck <mwilck@suse.com>
|
|
||||||
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
|
|
||||||
Cc: DM-DEVEL ML <dm-devel@redhat.com>
|
|
||||||
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
|
||||||
Reviewed-by: Martin Wilck <mwilck@suse.com>"
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
---
|
|
||||||
libmultipath/hwtable.c | 7 +++++--
|
|
||||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
|
|
||||||
index e884d8c7..2a896440 100644
|
|
||||||
--- a/libmultipath/hwtable.c
|
|
||||||
+++ b/libmultipath/hwtable.c
|
|
||||||
@@ -1078,11 +1078,14 @@ static struct hwentry default_hw[] = {
|
|
||||||
* Huawei
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
- /* OceanStor V3 */
|
|
||||||
+ /* OceanStor V3-V6 */
|
|
||||||
+ // This config works with multibus and ALUA
|
|
||||||
+ // ALUA is required by HyperMetro
|
|
||||||
.vendor = "HUAWEI",
|
|
||||||
.product = "XSG1",
|
|
||||||
.pgpolicy = GROUP_BY_PRIO,
|
|
||||||
- .prio_name = PRIO_ALUA,
|
|
||||||
+ .pgfailback = -FAILBACK_IMMEDIATE,
|
|
||||||
+ .no_path_retry = 15,
|
|
||||||
},
|
|
||||||
/*
|
|
||||||
* Kove
|
|
@ -1,23 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Date: Thu, 15 Jul 2021 14:46:49 -0500
|
|
||||||
Subject: [PATCH] multipath.conf: fix typo in ghost_delay description
|
|
||||||
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
---
|
|
||||||
multipath/multipath.conf.5 | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
|
|
||||||
index 064e4826..d6b8c7f6 100644
|
|
||||||
--- a/multipath/multipath.conf.5
|
|
||||||
+++ b/multipath/multipath.conf.5
|
|
||||||
@@ -1251,7 +1251,7 @@ The default is: in \fB/sys/block/<dev>/queue/max_sectors_kb\fR
|
|
||||||
Sets the number of seconds that multipath will wait after creating a device
|
|
||||||
with only ghost paths before marking it ready for use in systemd. This gives
|
|
||||||
the active paths time to appear before the multipath runs the hardware handler
|
|
||||||
-to switch the ghost paths to active ones. Setting this to \fI0\fR or \fIon\fR
|
|
||||||
+to switch the ghost paths to active ones. Setting this to \fI0\fR or \fIno\fR
|
|
||||||
makes multipath immediately mark a device with only ghost paths as ready.
|
|
||||||
.RS
|
|
||||||
.TP
|
|
@ -13,10 +13,10 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|||||||
1 file changed, 2 insertions(+), 16 deletions(-)
|
1 file changed, 2 insertions(+), 16 deletions(-)
|
||||||
|
|
||||||
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
||||||
index e9f5703c..7c1bcdf0 100644
|
index f25fe9e3..6fb81c28 100644
|
||||||
--- a/libmultipath/discovery.c
|
--- a/libmultipath/discovery.c
|
||||||
+++ b/libmultipath/discovery.c
|
+++ b/libmultipath/discovery.c
|
||||||
@@ -1135,12 +1135,9 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
|
@@ -1136,12 +1136,9 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
|
||||||
naa_prio = 7;
|
naa_prio = 7;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
@ -31,7 +31,7 @@ index e9f5703c..7c1bcdf0 100644
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* Default: no priority */
|
/* Default: no priority */
|
||||||
@@ -1159,17 +1156,6 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
|
@@ -1160,17 +1157,6 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
|
||||||
vpd = d;
|
vpd = d;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
@ -1,41 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Date: Thu, 15 Jul 2021 17:09:05 -0500
|
|
||||||
Subject: [PATCH] mpathpersist: fail commands when no usable paths exist
|
|
||||||
|
|
||||||
"mpathpersist -oCK <reservation_key> <device>" will return success if it
|
|
||||||
is run on devices with no usable paths, but nothing is actually done.
|
|
||||||
The -L command will fail, but it should give up sooner, and with a more
|
|
||||||
helpful error message.
|
|
||||||
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
---
|
|
||||||
libmpathpersist/mpath_persist.c | 8 +++++++-
|
|
||||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist/mpath_persist.c
|
|
||||||
index 190e9707..26710e79 100644
|
|
||||||
--- a/libmpathpersist/mpath_persist.c
|
|
||||||
+++ b/libmpathpersist/mpath_persist.c
|
|
||||||
@@ -604,7 +604,8 @@ int mpath_prout_common(struct multipath *mpp,int rq_servact, int rq_scope,
|
|
||||||
return ret ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- return MPATH_PR_SUCCESS;
|
|
||||||
+ condlog (0, "%s: no path available", mpp->wwid);
|
|
||||||
+ return MPATH_PR_DMMP_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
int send_prout_activepath(char * dev, int rq_servact, int rq_scope,
|
|
||||||
@@ -663,6 +664,11 @@ int mpath_prout_rel(struct multipath *mpp,int rq_servact, int rq_scope,
|
|
||||||
|
|
||||||
active_pathcount = count_active_paths(mpp);
|
|
||||||
|
|
||||||
+ if (active_pathcount == 0) {
|
|
||||||
+ condlog (0, "%s: no path available", mpp->wwid);
|
|
||||||
+ return MPATH_PR_DMMP_ERROR;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
struct threadinfo thread[active_pathcount];
|
|
||||||
memset(thread, 0, sizeof(thread));
|
|
||||||
for (i = 0; i < active_pathcount; i++){
|
|
@ -1,119 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Date: Fri, 16 Jul 2021 12:39:17 -0500
|
|
||||||
Subject: [PATCH] multipath: print warning if multipathd is not running.
|
|
||||||
|
|
||||||
If multipath notices that multipath devices exist or were created, and
|
|
||||||
multipathd is not running, it now prints a warning message, so users are
|
|
||||||
notified of the issue.
|
|
||||||
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
---
|
|
||||||
libmultipath/configure.c | 13 +++++++++++--
|
|
||||||
libmultipath/configure.h | 1 +
|
|
||||||
libmultipath/libmultipath.version | 5 +++++
|
|
||||||
multipath/main.c | 5 +++++
|
|
||||||
4 files changed, 22 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libmultipath/configure.c b/libmultipath/configure.c
|
|
||||||
index a6ae3359..eb76fbc4 100644
|
|
||||||
--- a/libmultipath/configure.c
|
|
||||||
+++ b/libmultipath/configure.c
|
|
||||||
@@ -1083,7 +1083,8 @@ deadmap (struct multipath * mpp)
|
|
||||||
return 1; /* dead */
|
|
||||||
}
|
|
||||||
|
|
||||||
-int check_daemon(void)
|
|
||||||
+extern int
|
|
||||||
+check_daemon(void)
|
|
||||||
{
|
|
||||||
int fd;
|
|
||||||
char *reply;
|
|
||||||
@@ -1138,6 +1139,8 @@ int coalesce_paths (struct vectors *vecs, vector mpvec, char *refwwid,
|
|
||||||
struct config *conf;
|
|
||||||
int allow_queueing;
|
|
||||||
struct bitfield *size_mismatch_seen;
|
|
||||||
+ bool map_processed = false;
|
|
||||||
+ bool no_daemon = false;
|
|
||||||
|
|
||||||
/* ignore refwwid if it's empty */
|
|
||||||
if (refwwid && !strlen(refwwid))
|
|
||||||
@@ -1288,7 +1291,9 @@ int coalesce_paths (struct vectors *vecs, vector mpvec, char *refwwid,
|
|
||||||
conf = get_multipath_config();
|
|
||||||
allow_queueing = conf->allow_queueing;
|
|
||||||
put_multipath_config(conf);
|
|
||||||
- if (!is_daemon && !allow_queueing && !check_daemon()) {
|
|
||||||
+ if (!is_daemon && !allow_queueing &&
|
|
||||||
+ (no_daemon || !check_daemon())) {
|
|
||||||
+ no_daemon = true;
|
|
||||||
if (mpp->no_path_retry != NO_PATH_RETRY_UNDEF &&
|
|
||||||
mpp->no_path_retry != NO_PATH_RETRY_FAIL)
|
|
||||||
condlog(3, "%s: multipathd not running, unset "
|
|
||||||
@@ -1311,6 +1316,7 @@ int coalesce_paths (struct vectors *vecs, vector mpvec, char *refwwid,
|
|
||||||
else
|
|
||||||
remove_map(mpp, vecs->pathvec, vecs->mpvec,
|
|
||||||
KEEP_VEC);
|
|
||||||
+ map_processed = true;
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* Flush maps with only dead paths (ie not in sysfs)
|
|
||||||
@@ -1336,6 +1342,9 @@ int coalesce_paths (struct vectors *vecs, vector mpvec, char *refwwid,
|
|
||||||
condlog(2, "%s: remove (dead)", alias);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+ if (map_processed && !is_daemon && (no_daemon || !check_daemon()))
|
|
||||||
+ condlog(2, "multipath devices exist, but multipathd service is not running");
|
|
||||||
+
|
|
||||||
ret = CP_OK;
|
|
||||||
out:
|
|
||||||
free(size_mismatch_seen);
|
|
||||||
diff --git a/libmultipath/configure.h b/libmultipath/configure.h
|
|
||||||
index 70cf77a3..741066b3 100644
|
|
||||||
--- a/libmultipath/configure.h
|
|
||||||
+++ b/libmultipath/configure.h
|
|
||||||
@@ -60,3 +60,4 @@ struct udev_device *get_udev_device(const char *dev, enum devtypes dev_type);
|
|
||||||
void trigger_paths_udev_change(struct multipath *mpp, bool is_mpath);
|
|
||||||
void trigger_partitions_udev_change(struct udev_device *dev, const char *action,
|
|
||||||
int len);
|
|
||||||
+int check_daemon(void);
|
|
||||||
diff --git a/libmultipath/libmultipath.version b/libmultipath/libmultipath.version
|
|
||||||
index 0cff3111..d8be5fd2 100644
|
|
||||||
--- a/libmultipath/libmultipath.version
|
|
||||||
+++ b/libmultipath/libmultipath.version
|
|
||||||
@@ -274,3 +274,8 @@ global:
|
|
||||||
local:
|
|
||||||
*;
|
|
||||||
};
|
|
||||||
+
|
|
||||||
+LIBMULTIPATH_5.1.0 {
|
|
||||||
+global:
|
|
||||||
+ check_daemon;
|
|
||||||
+} LIBMULTIPATH_5.0.0;
|
|
||||||
diff --git a/multipath/main.c b/multipath/main.c
|
|
||||||
index 8fc0e15f..33377147 100644
|
|
||||||
--- a/multipath/main.c
|
|
||||||
+++ b/multipath/main.c
|
|
||||||
@@ -180,6 +180,7 @@ get_dm_mpvec (enum mpath_cmds cmd, vector curmp, vector pathvec, char * refwwid)
|
|
||||||
int i;
|
|
||||||
struct multipath * mpp;
|
|
||||||
int flags = (cmd == CMD_LIST_SHORT ? DI_NOIO : DI_ALL);
|
|
||||||
+ bool maps_present = false;
|
|
||||||
|
|
||||||
if (dm_get_maps(curmp))
|
|
||||||
return 1;
|
|
||||||
@@ -212,11 +213,15 @@ get_dm_mpvec (enum mpath_cmds cmd, vector curmp, vector pathvec, char * refwwid)
|
|
||||||
|
|
||||||
if (cmd == CMD_CREATE)
|
|
||||||
reinstate_paths(mpp);
|
|
||||||
+
|
|
||||||
+ maps_present = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cmd == CMD_LIST_SHORT || cmd == CMD_LIST_LONG)
|
|
||||||
print_foreign_topology(libmp_verbosity);
|
|
||||||
|
|
||||||
+ if (maps_present && !check_daemon())
|
|
||||||
+ condlog(2, "multipath devices exist, but multipathd service is not running");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
@ -1,81 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Date: Fri, 16 Jul 2021 17:58:14 -0500
|
|
||||||
Subject: [PATCH] libmultipath: remove unneeded code in coalesce_paths
|
|
||||||
|
|
||||||
The code at the end of coalesce_paths() removes a multipath device that
|
|
||||||
was just created/reloaded, if none of its path devices have pp->dev set.
|
|
||||||
This code is very old, and no longer has any actual effect. Multipath
|
|
||||||
devices no longer get placed in pathvec without having pp->dev set. Even
|
|
||||||
if they could, there's no point in creating/reloading the device and
|
|
||||||
then immediately removing it.
|
|
||||||
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
---
|
|
||||||
libmultipath/configure.c | 46 ----------------------------------------
|
|
||||||
1 file changed, 46 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libmultipath/configure.c b/libmultipath/configure.c
|
|
||||||
index eb76fbc4..df6ba725 100644
|
|
||||||
--- a/libmultipath/configure.c
|
|
||||||
+++ b/libmultipath/configure.c
|
|
||||||
@@ -1061,28 +1061,6 @@ int domap(struct multipath *mpp, char *params, int is_daemon)
|
|
||||||
return DOMAP_FAIL;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static int
|
|
||||||
-deadmap (struct multipath * mpp)
|
|
||||||
-{
|
|
||||||
- int i, j;
|
|
||||||
- struct pathgroup * pgp;
|
|
||||||
- struct path * pp;
|
|
||||||
-
|
|
||||||
- if (!mpp->pg)
|
|
||||||
- return 1;
|
|
||||||
-
|
|
||||||
- vector_foreach_slot (mpp->pg, pgp, i) {
|
|
||||||
- if (!pgp->paths)
|
|
||||||
- continue;
|
|
||||||
-
|
|
||||||
- vector_foreach_slot (pgp->paths, pp, j)
|
|
||||||
- if (strlen(pp->dev))
|
|
||||||
- return 0; /* alive */
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- return 1; /* dead */
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
extern int
|
|
||||||
check_daemon(void)
|
|
||||||
{
|
|
||||||
@@ -1318,30 +1296,6 @@ int coalesce_paths (struct vectors *vecs, vector mpvec, char *refwwid,
|
|
||||||
KEEP_VEC);
|
|
||||||
map_processed = true;
|
|
||||||
}
|
|
||||||
- /*
|
|
||||||
- * Flush maps with only dead paths (ie not in sysfs)
|
|
||||||
- * Keep maps with only failed paths
|
|
||||||
- */
|
|
||||||
- if (mpvec) {
|
|
||||||
- vector_foreach_slot (newmp, mpp, i) {
|
|
||||||
- char alias[WWID_SIZE];
|
|
||||||
-
|
|
||||||
- if (!deadmap(mpp))
|
|
||||||
- continue;
|
|
||||||
-
|
|
||||||
- strlcpy(alias, mpp->alias, WWID_SIZE);
|
|
||||||
-
|
|
||||||
- vector_del_slot(newmp, i);
|
|
||||||
- i--;
|
|
||||||
- remove_map(mpp, vecs->pathvec, vecs->mpvec, KEEP_VEC);
|
|
||||||
-
|
|
||||||
- if (dm_flush_map(alias))
|
|
||||||
- condlog(2, "%s: remove failed (dead)",
|
|
||||||
- alias);
|
|
||||||
- else
|
|
||||||
- condlog(2, "%s: remove (dead)", alias);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
if (map_processed && !is_daemon && (no_daemon || !check_daemon()))
|
|
||||||
condlog(2, "multipath devices exist, but multipathd service is not running");
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Date: Thu, 29 Jul 2021 13:16:57 -0500
|
|
||||||
Subject: [PATCH] libmultipath: deal with dynamic PTHREAD_STACK_MIN
|
|
||||||
|
|
||||||
Starting in glibc-2.34 (commit 5d98a7da), PTHREAD_STACK_MIN is defined
|
|
||||||
as sysconf(_SC_THREAD_STACK_MIN) if _GNU_SOURCE is defined. sysconf()
|
|
||||||
returns a long and can, at least in theory, return -1. This change
|
|
||||||
causes compilation to fail in setup_thread_attr() due to a comparision
|
|
||||||
with different signedness, since stacksize is a size_t.
|
|
||||||
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
---
|
|
||||||
libmultipath/util.c | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libmultipath/util.c b/libmultipath/util.c
|
|
||||||
index 0e37f3ff..17f8fcc6 100644
|
|
||||||
--- a/libmultipath/util.c
|
|
||||||
+++ b/libmultipath/util.c
|
|
||||||
@@ -223,8 +223,8 @@ setup_thread_attr(pthread_attr_t *attr, size_t stacksize, int detached)
|
|
||||||
|
|
||||||
ret = pthread_attr_init(attr);
|
|
||||||
assert(ret == 0);
|
|
||||||
- if (stacksize < PTHREAD_STACK_MIN)
|
|
||||||
- stacksize = PTHREAD_STACK_MIN;
|
|
||||||
+ if (PTHREAD_STACK_MIN > 0 && stacksize < (size_t)PTHREAD_STACK_MIN)
|
|
||||||
+ stacksize = (size_t)PTHREAD_STACK_MIN;
|
|
||||||
ret = pthread_attr_setstacksize(attr, stacksize);
|
|
||||||
assert(ret == 0);
|
|
||||||
if (detached) {
|
|
@ -1,48 +1,35 @@
|
|||||||
Name: device-mapper-multipath
|
Name: device-mapper-multipath
|
||||||
Version: 0.8.6
|
Version: 0.8.7
|
||||||
Release: 5%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Tools to manage multipath devices using device-mapper
|
Summary: Tools to manage multipath devices using device-mapper
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: http://christophe.varoqui.free.fr/
|
URL: http://christophe.varoqui.free.fr/
|
||||||
|
|
||||||
# The source for this package was pulled from upstream's git repo. Use the
|
# The source for this package was pulled from upstream's git repo. Use the
|
||||||
# following command to generate the tarball
|
# following command to generate the tarball
|
||||||
# curl -L https://github.com/opensvc/multipath-tools/archive/0.8.6.tar.gz -o multipath-tools-0.8.6.tgz
|
# curl -L https://github.com/opensvc/multipath-tools/archive/0.8.7.tar.gz -o multipath-tools-0.8.7.tgz
|
||||||
Source0: multipath-tools-0.8.6.tgz
|
Source0: multipath-tools-0.8.7.tgz
|
||||||
Source1: multipath.conf
|
Source1: multipath.conf
|
||||||
Patch0001: 0001-libmultipath-fix-memory-leak-in-checker_cleanup_thre.patch
|
Patch0001: 0001-multipath-tools-add-info-about-IO-affinity-path-sele.patch
|
||||||
Patch0002: 0002-multipathd-fix-compilation-issue-with-liburcu-0.8.patch
|
Patch0002: 0002-multipathd-fix-missing-persistent-reseravtion-for-ac.patch
|
||||||
Patch0003: 0003-multipathd-don-t-fail-to-remove-path-once-the-map-is.patch
|
Patch0003: 0003-multipath-tools-minor-fixes-to-multipath.conf.5-man-.patch
|
||||||
Patch0004: 0004-multipathd-remove-duplicate-orphan_paths-in-flush_ma.patch
|
Patch0004: 0004-multipath-tools-make-IBM-XIV-config-work-with-alua-a.patch
|
||||||
Patch0005: 0005-multipathd-fix-ev_remove_path-return-code-handling.patch
|
Patch0005: 0005-multipathd.socket-add-missing-conditions-from-servic.patch
|
||||||
Patch0006: 0006-multipath-free-vectors-in-configure.patch
|
Patch0006: 0006-multipath-tools-make-IBM-2107900-DS8000-config-work-.patch
|
||||||
Patch0007: 0007-kpartx-Don-t-leak-memory-when-getblock-returns-NULL.patch
|
Patch0007: 0007-multipath-tools-make-EMC-SYMMETRIX-config-work-with-.patch
|
||||||
Patch0008: 0008-multipathd-don-t-rescan_path-on-wwid-change-in-uev_u.patch
|
Patch0008: 0008-multipath-tools-make-EMC-Invista-config-work-with-al.patch
|
||||||
Patch0009: 0009-multipathd-cli_handlers-cleanup-setting-reply-length.patch
|
Patch0009: 0009-multipath-tools-make-COMPELNT-Compellent-Vol-config-.patch
|
||||||
Patch0010: 0010-multipathd-cli_getprkey-fix-return-value.patch
|
Patch0010: 0010-multipath-tools-remove-Compellent-maintainer.patch
|
||||||
Patch0011: 0011-multipath-tools-enable-Wformat-overflow-2.patch
|
Patch0011: 0011-RH-fixup-udev-rules-for-redhat.patch
|
||||||
Patch0012: 0012-libdmmp-use-KBUILD_BUILD_TIMESTAMP-when-building-man.patch
|
Patch0012: 0012-RH-Remove-the-property-blacklist-exception-builtin.patch
|
||||||
Patch0013: 0013-multipath-tools-add-info-about-HPE-Alletra-6000-and-.patch
|
Patch0013: 0013-RH-don-t-start-without-a-config-file.patch
|
||||||
Patch0014: 0014-multipathd-don-t-start-in-containers.patch
|
Patch0014: 0014-RH-Fix-nvme-function-missing-argument.patch
|
||||||
Patch0015: 0015-libmultipath-fix-build-without-LIBDM_API_DEFERRED.patch
|
Patch0015: 0015-RH-use-rpm-optflags-if-present.patch
|
||||||
Patch0016: 0016-libmultipath-use-uint64_t-for-sg_id.lun.patch
|
Patch0016: 0016-RH-add-mpathconf.patch
|
||||||
Patch0017: 0017-multipath-tools-Remove-trailing-leading-whitespaces.patch
|
Patch0017: 0017-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch
|
||||||
Patch0018: 0018-multipath-tools-make-HUAWEI-XSG1-config-work-with-al.patch
|
Patch0018: 0018-RH-reset-default-find_mutipaths-value-to-off.patch
|
||||||
Patch0019: 0019-multipath.conf-fix-typo-in-ghost_delay-description.patch
|
Patch0019: 0019-RH-attempt-to-get-ANA-info-via-sysfs-first.patch
|
||||||
Patch0020: 0020-mpathpersist-fail-commands-when-no-usable-paths-exis.patch
|
Patch0020: 0020-RH-make-parse_vpd_pg83-match-scsi_id-output.patch
|
||||||
Patch0021: 0021-multipath-print-warning-if-multipathd-is-not-running.patch
|
|
||||||
Patch0022: 0022-libmultipath-remove-unneeded-code-in-coalesce_paths.patch
|
|
||||||
Patch0023: 0023-libmultipath-deal-with-dynamic-PTHREAD_STACK_MIN.patch
|
|
||||||
Patch0024: 0024-RH-fixup-udev-rules-for-redhat.patch
|
|
||||||
Patch0025: 0025-RH-Remove-the-property-blacklist-exception-builtin.patch
|
|
||||||
Patch0026: 0026-RH-don-t-start-without-a-config-file.patch
|
|
||||||
Patch0027: 0027-RH-Fix-nvme-function-missing-argument.patch
|
|
||||||
Patch0028: 0028-RH-use-rpm-optflags-if-present.patch
|
|
||||||
Patch0029: 0029-RH-add-mpathconf.patch
|
|
||||||
Patch0030: 0030-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch
|
|
||||||
Patch0031: 0031-RH-reset-default-find_mutipaths-value-to-off.patch
|
|
||||||
Patch0032: 0032-RH-attempt-to-get-ANA-info-via-sysfs-first.patch
|
|
||||||
Patch0033: 0033-RH-make-parse_vpd_pg83-match-scsi_id-output.patch
|
|
||||||
|
|
||||||
# runtime
|
# runtime
|
||||||
Requires: %{name}-libs = %{version}-%{release}
|
Requires: %{name}-libs = %{version}-%{release}
|
||||||
@ -126,7 +113,7 @@ This package contains the files needed to develop applications that use
|
|||||||
device-mapper-multipath's libdmmp C API library
|
device-mapper-multipath's libdmmp C API library
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n multipath-tools-0.8.6 -p1
|
%autosetup -n multipath-tools-0.8.7 -p1
|
||||||
cp %{SOURCE1} .
|
cp %{SOURCE1} .
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -240,6 +227,14 @@ fi
|
|||||||
%{_pkgconfdir}/libdmmp.pc
|
%{_pkgconfdir}/libdmmp.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Oct 6 2021 Benjamin Marzinski <bmarzins@redhat.com> - 0.8.7-1
|
||||||
|
- Update source to upstream version 0.8.7
|
||||||
|
* Previous patches 0001-0023 are included in the commit.
|
||||||
|
- Add patches from upstream staging branch
|
||||||
|
* Patches 0001-0010 are from the upstream staging branch
|
||||||
|
- Rename redhat patches
|
||||||
|
* Previous patches 0024-0033 are now patches 0011-0020
|
||||||
|
|
||||||
* Fri Jul 30 2021 Benjamin Marzinski <bmarzins@redhat.com> - 0.8.6-5
|
* Fri Jul 30 2021 Benjamin Marzinski <bmarzins@redhat.com> - 0.8.6-5
|
||||||
- Update to the head of the upstream staging branch plus redhat patches
|
- Update to the head of the upstream staging branch plus redhat patches
|
||||||
* Patches 0016-0018 are from the upstream staging branch
|
* Patches 0016-0018 are from the upstream staging branch
|
||||||
|
2
sources
2
sources
@ -1,2 +1,2 @@
|
|||||||
SHA512 (multipath-tools-0.8.6.tgz) = 82e5b7307e599ba6b059679c3987a442fb5be4885f0a27c260a99a07cb336b88d48e314b4ec951944e0200e4731522d8da043d98fa566857ecc6d100791c0e38
|
SHA512 (multipath-tools-0.8.7.tgz) = c01aea837b13429d17688455b813947342ca1cabba19b22e13ce640c77e68335a6d410280a8298595e239131e6fcbb655fa6de5ff9857eac99aa175046a450cd
|
||||||
SHA512 (multipath.conf) = 71953dce5a68adcf60a942305f5a66023e6f4c4baf53b1bfdb4edf65ed5b8e03db804363c36d1dcfd85591f4766f52b515269904c53b84d7b076da0b80b09942
|
SHA512 (multipath.conf) = 71953dce5a68adcf60a942305f5a66023e6f4c4baf53b1bfdb4edf65ed5b8e03db804363c36d1dcfd85591f4766f52b515269904c53b84d7b076da0b80b09942
|
||||||
|
Loading…
Reference in New Issue
Block a user