device-mapper-multipath-0.7.9-2.git17a6101
Update Source to latest upstream commit * Previous patches 0001-0003 are included in this version Rename files * Previous patches 0004-0011 are now patches 0002-0009 Add 0001-libmultipath-dm_is_mpath-cleanup.patch * This patch has been submitted upstream
This commit is contained in:
parent
170e923cae
commit
134254a5b4
1
.gitignore
vendored
1
.gitignore
vendored
@ -15,3 +15,4 @@ multipath-tools-091027.tar.gz
|
||||
/multipath-tools-b80318b.tgz
|
||||
/multipath-tools-0.7.8.tgz
|
||||
/multipath-tools-0.7.9.tgz
|
||||
/multipath-tools-17a6101.tgz
|
||||
|
92
0001-libmultipath-dm_is_mpath-cleanup.patch
Normal file
92
0001-libmultipath-dm_is_mpath-cleanup.patch
Normal file
@ -0,0 +1,92 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Date: Tue, 11 Dec 2018 14:11:19 -0600
|
||||
Subject: [PATCH] libmultipath: dm_is_mpath cleanup
|
||||
|
||||
Add condlog() message in dm_is_mpath() fails and change the
|
||||
dm_is_mpath() call in watch_dmevents() to check the return value with
|
||||
the same syntax as all the other callers.
|
||||
|
||||
Fixes: 9050cd5a "libmultipath: fix false removes in dmevents polling code"
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
libmultipath/devmapper.c | 21 ++++++++++++---------
|
||||
multipathd/dmevents.c | 4 +++-
|
||||
2 files changed, 15 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
|
||||
index 0e98923..3294bd4 100644
|
||||
--- a/libmultipath/devmapper.c
|
||||
+++ b/libmultipath/devmapper.c
|
||||
@@ -709,41 +709,44 @@ int dm_is_mpath(const char *name)
|
||||
const char *uuid;
|
||||
|
||||
if (!(dmt = libmp_dm_task_create(DM_DEVICE_TABLE)))
|
||||
- return -1;
|
||||
+ goto out;
|
||||
|
||||
if (!dm_task_set_name(dmt, name))
|
||||
- goto out;
|
||||
+ goto out_task;
|
||||
|
||||
dm_task_no_open_count(dmt);
|
||||
|
||||
if (!dm_task_run(dmt))
|
||||
- goto out;
|
||||
+ goto out_task;
|
||||
|
||||
if (!dm_task_get_info(dmt, &info))
|
||||
- goto out;
|
||||
+ goto out_task;
|
||||
|
||||
r = 0;
|
||||
|
||||
if (!info.exists)
|
||||
- goto out;
|
||||
+ goto out_task;
|
||||
|
||||
uuid = dm_task_get_uuid(dmt);
|
||||
|
||||
if (!uuid || strncmp(uuid, UUID_PREFIX, UUID_PREFIX_LEN) != 0)
|
||||
- goto out;
|
||||
+ goto out_task;
|
||||
|
||||
/* Fetch 1st target */
|
||||
if (dm_get_next_target(dmt, NULL, &start, &length, &target_type,
|
||||
¶ms) != NULL)
|
||||
/* multiple targets */
|
||||
- goto out;
|
||||
+ goto out_task;
|
||||
|
||||
if (!target_type || strcmp(target_type, TGT_MPATH) != 0)
|
||||
- goto out;
|
||||
+ goto out_task;
|
||||
|
||||
r = 1;
|
||||
-out:
|
||||
+out_task:
|
||||
dm_task_destroy(dmt);
|
||||
+out:
|
||||
+ if (r < 0)
|
||||
+ condlog(2, "%s: dm command failed in %s", name, __FUNCTION__);
|
||||
return r;
|
||||
}
|
||||
|
||||
diff --git a/multipathd/dmevents.c b/multipathd/dmevents.c
|
||||
index aae7a09..0034892 100644
|
||||
--- a/multipathd/dmevents.c
|
||||
+++ b/multipathd/dmevents.c
|
||||
@@ -206,7 +206,9 @@ int watch_dmevents(char *name)
|
||||
struct dev_event *dev_evt, *old_dev_evt;
|
||||
int i;
|
||||
|
||||
- if (!dm_is_mpath(name)) {
|
||||
+ /* We know that this is a multipath device, so only fail if
|
||||
+ * device-mapper tells us that we're wrong */
|
||||
+ if (dm_is_mpath(name) == 0) {
|
||||
condlog(0, "%s: not a multipath device. can't watch events",
|
||||
name);
|
||||
return -1;
|
||||
--
|
||||
2.17.2
|
||||
|
@ -1,111 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Date: Tue, 20 Nov 2018 22:24:44 -0600
|
||||
Subject: [PATCH] multipathd: fix mpp->hwe handling when paths are freed
|
||||
|
||||
Commit 1f962693 didn't deal with all of cases where a path that was part
|
||||
of a multipath device could be removed. verify_paths() removes any path
|
||||
that no longer exists in sysfs. mpp->hwe needs to be updated here as
|
||||
well, since verify_paths() could remove the path whose hwe vector is
|
||||
pointed to by mpp->hwe. Also, now that extract_hwe_from_path() is
|
||||
called in verify_paths(), the extract_hwe_from_path() calls that
|
||||
happened immediately after verify_paths() can be dropped.
|
||||
|
||||
The other part of this fix is mostly cosmetic. In ev_add_path(), if
|
||||
domap() fails after the path is added to the multipath device and
|
||||
verify_paths() is called, the code can loop back to the rescan label. If
|
||||
the size of the path or the multipath device changed in the interim,
|
||||
ev_add_path() would remove the path, without updating mpp->hwe; but
|
||||
there is no way for the size to change. Just to make that clearer in the
|
||||
code, I've moved the size check to before the rescan label so it only
|
||||
happens once.
|
||||
|
||||
Fixes: 1f962693 "multipathd: fix mpp->hwe handling on path removal"
|
||||
Cc: Martin Wilck <mwilck@suse.com>
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
libmultipath/structs_vec.c | 7 +++++++
|
||||
multipathd/main.c | 21 ++++++++-------------
|
||||
2 files changed, 15 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
|
||||
index c85823a..e28a88a 100644
|
||||
--- a/libmultipath/structs_vec.c
|
||||
+++ b/libmultipath/structs_vec.c
|
||||
@@ -407,6 +407,12 @@ int verify_paths(struct multipath *mpp, struct vectors *vecs)
|
||||
vector_del_slot(mpp->paths, i);
|
||||
i--;
|
||||
|
||||
+ /* Make sure mpp->hwe doesn't point to freed memory.
|
||||
+ * We call extract_hwe_from_path() below to restore
|
||||
+ * mpp->hwe
|
||||
+ */
|
||||
+ if (mpp->hwe == pp->hwe)
|
||||
+ mpp->hwe = NULL;
|
||||
if ((j = find_slot(vecs->pathvec,
|
||||
(void *)pp)) != -1)
|
||||
vector_del_slot(vecs->pathvec, j);
|
||||
@@ -416,6 +422,7 @@ int verify_paths(struct multipath *mpp, struct vectors *vecs)
|
||||
mpp->alias, pp->dev, pp->dev_t);
|
||||
}
|
||||
}
|
||||
+ extract_hwe_from_path(mpp);
|
||||
return count;
|
||||
}
|
||||
|
||||
diff --git a/multipathd/main.c b/multipathd/main.c
|
||||
index cc555bb..2e5f9ed 100644
|
||||
--- a/multipathd/main.c
|
||||
+++ b/multipathd/main.c
|
||||
@@ -491,7 +491,6 @@ retry:
|
||||
verify_paths(mpp, vecs);
|
||||
mpp->action = ACT_RELOAD;
|
||||
|
||||
- extract_hwe_from_path(mpp);
|
||||
if (setup_map(mpp, params, PARAMS_SIZE, vecs)) {
|
||||
condlog(0, "%s: failed to setup new map in update", mpp->alias);
|
||||
retries = -1;
|
||||
@@ -925,6 +924,14 @@ ev_add_path (struct path * pp, struct vectors * vecs, int need_do_map)
|
||||
goto fail; /* leave path added to pathvec */
|
||||
}
|
||||
mpp = find_mp_by_wwid(vecs->mpvec, pp->wwid);
|
||||
+ if (mpp && pp->size && mpp->size != pp->size) {
|
||||
+ condlog(0, "%s: failed to add new path %s, device size mismatch", mpp->alias, pp->dev);
|
||||
+ int i = find_slot(vecs->pathvec, (void *)pp);
|
||||
+ if (i != -1)
|
||||
+ vector_del_slot(vecs->pathvec, i);
|
||||
+ free_path(pp);
|
||||
+ return 1;
|
||||
+ }
|
||||
if (mpp && mpp->wait_for_udev &&
|
||||
(pathcount(mpp, PATH_UP) > 0 ||
|
||||
(pathcount(mpp, PATH_GHOST) > 0 && pp->tpgs != TPGS_IMPLICIT &&
|
||||
@@ -940,17 +947,6 @@ ev_add_path (struct path * pp, struct vectors * vecs, int need_do_map)
|
||||
pp->mpp = mpp;
|
||||
rescan:
|
||||
if (mpp) {
|
||||
- if (pp->size && mpp->size != pp->size) {
|
||||
- condlog(0, "%s: failed to add new path %s, "
|
||||
- "device size mismatch",
|
||||
- mpp->alias, pp->dev);
|
||||
- int i = find_slot(vecs->pathvec, (void *)pp);
|
||||
- if (i != -1)
|
||||
- vector_del_slot(vecs->pathvec, i);
|
||||
- free_path(pp);
|
||||
- return 1;
|
||||
- }
|
||||
-
|
||||
condlog(4,"%s: adopting all paths for path %s",
|
||||
mpp->alias, pp->dev);
|
||||
if (adopt_paths(vecs->pathvec, mpp))
|
||||
@@ -958,7 +954,6 @@ rescan:
|
||||
|
||||
verify_paths(mpp, vecs);
|
||||
mpp->action = ACT_RELOAD;
|
||||
- extract_hwe_from_path(mpp);
|
||||
} else {
|
||||
if (!should_multipath(pp, vecs->pathvec, vecs->mpvec)) {
|
||||
orphan_path(pp, "only one path");
|
||||
--
|
||||
2.17.2
|
||||
|
@ -65,10 +65,10 @@ index 0828a8f..b9bbb3c 100644
|
||||
$(RM) $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz
|
||||
|
||||
diff --git a/multipath/main.c b/multipath/main.c
|
||||
index 98fee1c..856202a 100644
|
||||
index f40c179..f3265ee 100644
|
||||
--- a/multipath/main.c
|
||||
+++ b/multipath/main.c
|
||||
@@ -401,7 +401,7 @@ static int find_multipaths_check_timeout(const struct path *pp, long tmo,
|
||||
@@ -414,7 +414,7 @@ static int find_multipaths_check_timeout(const struct path *pp, long tmo,
|
||||
struct timespec now, ftimes[2], tdiff;
|
||||
struct stat st;
|
||||
long fd;
|
@ -1,44 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Date: Mon, 26 Nov 2018 16:42:24 -0600
|
||||
Subject: [PATCH] libmultipath: cleanup pthread_cleanup_pop call
|
||||
|
||||
pthread_cleanup_push() and pthread_cleanup_pop() must be called in the
|
||||
same lexical scope. In uevent_listen(), the pthread_cleanup_pop() call
|
||||
to cleanup the udev monitor is called in a nested 'if' block, within
|
||||
the block where pthread_cleanup_push() is called. Since this is a
|
||||
single-statement if block, it doesn't actually cause any problems, but
|
||||
it should be fixed anyways.
|
||||
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
libmultipath/uevent.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/uevent.c b/libmultipath/uevent.c
|
||||
index 5f910e6..f73de8c 100644
|
||||
--- a/libmultipath/uevent.c
|
||||
+++ b/libmultipath/uevent.c
|
||||
@@ -806,7 +806,7 @@ int uevent_listen(struct udev *udev)
|
||||
monitor = udev_monitor_new_from_netlink(udev, "udev");
|
||||
if (!monitor) {
|
||||
condlog(2, "failed to create udev monitor");
|
||||
- goto out;
|
||||
+ goto failback;
|
||||
}
|
||||
pthread_cleanup_push(monitor_cleanup, monitor);
|
||||
#ifdef LIBUDEV_API_RECVBUF
|
||||
@@ -893,8 +893,8 @@ int uevent_listen(struct udev *udev)
|
||||
}
|
||||
need_failback = 0;
|
||||
out:
|
||||
- if (monitor)
|
||||
- pthread_cleanup_pop(1);
|
||||
+ pthread_cleanup_pop(1);
|
||||
+failback:
|
||||
if (need_failback)
|
||||
err = failback_listen();
|
||||
pthread_cleanup_pop(1);
|
||||
--
|
||||
2.17.2
|
||||
|
@ -18,7 +18,7 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
2 files changed, 10 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/blacklist.c b/libmultipath/blacklist.c
|
||||
index 318ec03..c0cfbca 100644
|
||||
index 709895e..224e5b3 100644
|
||||
--- a/libmultipath/blacklist.c
|
||||
+++ b/libmultipath/blacklist.c
|
||||
@@ -204,12 +204,6 @@ setup_default_blist (struct config * conf)
|
||||
@ -34,7 +34,7 @@ index 318ec03..c0cfbca 100644
|
||||
vector_foreach_slot (conf->hwtable, hwe, i) {
|
||||
if (hwe->bl_product) {
|
||||
if (find_blacklist_device(conf->blist_device,
|
||||
@@ -394,9 +388,11 @@ filter_property(struct config * conf, struct udev_device * udev)
|
||||
@@ -394,9 +388,11 @@ filter_property(struct config *conf, struct udev_device *udev, int lvl)
|
||||
if (udev) {
|
||||
/*
|
||||
* This is the inverse of the 'normal' matching;
|
@ -1,204 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Date: Tue, 27 Nov 2018 22:50:57 -0600
|
||||
Subject: [PATCH] libmultipath: fix false removes in dmevents polling code
|
||||
|
||||
dm_is_mpath() would return 0 if either a device was not a multipath
|
||||
device or if the libdevmapper command failed. Because dm_is_mpath()
|
||||
didn't distinguish between these situations, dm_get_events() could
|
||||
assume that a device was not really a multipath device, when in fact it
|
||||
was, and the libdevmapper command simply failed. This would cause the
|
||||
dmevents polling waiter to stop monitoring the device.
|
||||
|
||||
In reality, the call to dm_is_mpath() isn't necessary, because
|
||||
dm_get_events() will already verify that the device name is on the list
|
||||
of devices to wait for. However, if there are a large number of
|
||||
non-multipath devices on the system, ignoring them can be useful. Thus,
|
||||
if dm_is_mpath() successfully runs the libdevmapper command and verifies
|
||||
that the device is not a multipath device, dm_get_events() should skip
|
||||
it. But if the libdevmapper command fails, dm_get_events() should still
|
||||
check the device list, to see if the device should be monitored.
|
||||
|
||||
This commit makes dm_is_mpath() return -1 for situations where
|
||||
the libdevmapper command failed, and makes dm_get_events() only ignore
|
||||
the device on a return of 0.
|
||||
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
libmpathpersist/mpath_persist.c | 4 ++--
|
||||
libmultipath/devmapper.c | 41 +++++++++++++++++++++++----------
|
||||
multipath/main.c | 2 +-
|
||||
multipathd/dmevents.c | 8 +++++--
|
||||
multipathd/main.c | 2 +-
|
||||
5 files changed, 39 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist/mpath_persist.c
|
||||
index 2ffe56e..7e8a676 100644
|
||||
--- a/libmpathpersist/mpath_persist.c
|
||||
+++ b/libmpathpersist/mpath_persist.c
|
||||
@@ -188,7 +188,7 @@ int mpath_persistent_reserve_in (int fd, int rq_servact,
|
||||
|
||||
condlog(3, "alias = %s", alias);
|
||||
map_present = dm_map_present(alias);
|
||||
- if (map_present && !dm_is_mpath(alias)){
|
||||
+ if (map_present && dm_is_mpath(alias) != 1){
|
||||
condlog( 0, "%s: not a multipath device.", alias);
|
||||
ret = MPATH_PR_DMMP_ERROR;
|
||||
goto out;
|
||||
@@ -283,7 +283,7 @@ int mpath_persistent_reserve_out ( int fd, int rq_servact, int rq_scope,
|
||||
condlog(3, "alias = %s", alias);
|
||||
map_present = dm_map_present(alias);
|
||||
|
||||
- if (map_present && !dm_is_mpath(alias)){
|
||||
+ if (map_present && dm_is_mpath(alias) != 1){
|
||||
condlog(3, "%s: not a multipath device.", alias);
|
||||
ret = MPATH_PR_DMMP_ERROR;
|
||||
goto out;
|
||||
diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
|
||||
index 0433b49..3294bd4 100644
|
||||
--- a/libmultipath/devmapper.c
|
||||
+++ b/libmultipath/devmapper.c
|
||||
@@ -692,9 +692,15 @@ out:
|
||||
return r;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * returns:
|
||||
+ * 1 : is multipath device
|
||||
+ * 0 : is not multipath device
|
||||
+ * -1 : error
|
||||
+ */
|
||||
int dm_is_mpath(const char *name)
|
||||
{
|
||||
- int r = 0;
|
||||
+ int r = -1;
|
||||
struct dm_task *dmt;
|
||||
struct dm_info info;
|
||||
uint64_t start, length;
|
||||
@@ -703,33 +709,44 @@ int dm_is_mpath(const char *name)
|
||||
const char *uuid;
|
||||
|
||||
if (!(dmt = libmp_dm_task_create(DM_DEVICE_TABLE)))
|
||||
- return 0;
|
||||
+ goto out;
|
||||
|
||||
if (!dm_task_set_name(dmt, name))
|
||||
- goto out;
|
||||
+ goto out_task;
|
||||
|
||||
dm_task_no_open_count(dmt);
|
||||
|
||||
if (!dm_task_run(dmt))
|
||||
- goto out;
|
||||
+ goto out_task;
|
||||
|
||||
- if (!dm_task_get_info(dmt, &info) || !info.exists)
|
||||
- goto out;
|
||||
+ if (!dm_task_get_info(dmt, &info))
|
||||
+ goto out_task;
|
||||
+
|
||||
+ r = 0;
|
||||
+
|
||||
+ if (!info.exists)
|
||||
+ goto out_task;
|
||||
|
||||
uuid = dm_task_get_uuid(dmt);
|
||||
|
||||
if (!uuid || strncmp(uuid, UUID_PREFIX, UUID_PREFIX_LEN) != 0)
|
||||
- goto out;
|
||||
+ goto out_task;
|
||||
|
||||
/* Fetch 1st target */
|
||||
- dm_get_next_target(dmt, NULL, &start, &length, &target_type, ¶ms);
|
||||
+ if (dm_get_next_target(dmt, NULL, &start, &length, &target_type,
|
||||
+ ¶ms) != NULL)
|
||||
+ /* multiple targets */
|
||||
+ goto out_task;
|
||||
|
||||
if (!target_type || strcmp(target_type, TGT_MPATH) != 0)
|
||||
- goto out;
|
||||
+ goto out_task;
|
||||
|
||||
r = 1;
|
||||
-out:
|
||||
+out_task:
|
||||
dm_task_destroy(dmt);
|
||||
+out:
|
||||
+ if (r < 0)
|
||||
+ condlog(2, "%s: dm command failed in %s", name, __FUNCTION__);
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -823,7 +840,7 @@ int _dm_flush_map (const char * mapname, int need_sync, int deferred_remove,
|
||||
unsigned long long mapsize;
|
||||
char params[PARAMS_SIZE] = {0};
|
||||
|
||||
- if (!dm_is_mpath(mapname))
|
||||
+ if (dm_is_mpath(mapname) != 1)
|
||||
return 0; /* nothing to do */
|
||||
|
||||
/* if the device currently has no partitions, do not
|
||||
@@ -1087,7 +1104,7 @@ dm_get_maps (vector mp)
|
||||
}
|
||||
|
||||
do {
|
||||
- if (!dm_is_mpath(names->name))
|
||||
+ if (dm_is_mpath(names->name) != 1)
|
||||
goto next;
|
||||
|
||||
mpp = dm_get_multipath(names->name);
|
||||
diff --git a/multipath/main.c b/multipath/main.c
|
||||
index 05b7bf0..98fee1c 100644
|
||||
--- a/multipath/main.c
|
||||
+++ b/multipath/main.c
|
||||
@@ -319,7 +319,7 @@ static int check_usable_paths(struct config *conf,
|
||||
goto out;
|
||||
}
|
||||
|
||||
- if (!dm_is_mpath(mapname)) {
|
||||
+ if (dm_is_mpath(mapname) != 1) {
|
||||
condlog(1, "%s is not a multipath map", devpath);
|
||||
goto free;
|
||||
}
|
||||
diff --git a/multipathd/dmevents.c b/multipathd/dmevents.c
|
||||
index 31e64a7..0034892 100644
|
||||
--- a/multipathd/dmevents.c
|
||||
+++ b/multipathd/dmevents.c
|
||||
@@ -168,7 +168,9 @@ static int dm_get_events(void)
|
||||
while (names->dev) {
|
||||
uint32_t event_nr;
|
||||
|
||||
- if (!dm_is_mpath(names->name))
|
||||
+ /* Don't delete device if dm_is_mpath() fails without
|
||||
+ * checking the device type */
|
||||
+ if (dm_is_mpath(names->name) == 0)
|
||||
goto next;
|
||||
|
||||
event_nr = dm_event_nr(names);
|
||||
@@ -204,7 +206,9 @@ int watch_dmevents(char *name)
|
||||
struct dev_event *dev_evt, *old_dev_evt;
|
||||
int i;
|
||||
|
||||
- if (!dm_is_mpath(name)) {
|
||||
+ /* We know that this is a multipath device, so only fail if
|
||||
+ * device-mapper tells us that we're wrong */
|
||||
+ if (dm_is_mpath(name) == 0) {
|
||||
condlog(0, "%s: not a multipath device. can't watch events",
|
||||
name);
|
||||
return -1;
|
||||
diff --git a/multipathd/main.c b/multipathd/main.c
|
||||
index 2e5f9ed..c781115 100644
|
||||
--- a/multipathd/main.c
|
||||
+++ b/multipathd/main.c
|
||||
@@ -699,7 +699,7 @@ ev_add_map (char * dev, const char * alias, struct vectors * vecs)
|
||||
int delayed_reconfig, reassign_maps;
|
||||
struct config *conf;
|
||||
|
||||
- if (!dm_is_mpath(alias)) {
|
||||
+ if (dm_is_mpath(alias) != 1) {
|
||||
condlog(4, "%s: not a multipath map", alias);
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.17.2
|
||||
|
@ -86,10 +86,10 @@ index 0c6ee54..e32a0b0 100644
|
||||
enum {
|
||||
WWID_IS_NOT_FAILED = 0,
|
||||
diff --git a/multipath/main.c b/multipath/main.c
|
||||
index 856202a..2c4054d 100644
|
||||
index f3265ee..37b8e31 100644
|
||||
--- a/multipath/main.c
|
||||
+++ b/multipath/main.c
|
||||
@@ -120,7 +120,7 @@ usage (char * progname)
|
||||
@@ -133,7 +133,7 @@ usage (char * progname)
|
||||
{
|
||||
fprintf (stderr, VERSION_STRING);
|
||||
fprintf (stderr, "Usage:\n");
|
||||
@ -98,7 +98,7 @@ index 856202a..2c4054d 100644
|
||||
fprintf (stderr, " %s -l|-ll|-f [-v lvl] [-b fil] [-R num] [dev]\n", progname);
|
||||
fprintf (stderr, " %s -F [-v lvl] [-R num]\n", progname);
|
||||
fprintf (stderr, " %s [-t|-T]\n", progname);
|
||||
@@ -134,6 +134,8 @@ usage (char * progname)
|
||||
@@ -147,6 +147,8 @@ usage (char * progname)
|
||||
" -f flush a multipath device map\n"
|
||||
" -F flush all multipath device maps\n"
|
||||
" -a add a device wwid to the wwids file\n"
|
||||
@ -107,8 +107,8 @@ index 856202a..2c4054d 100644
|
||||
" -c check if a device should be a path in a multipath device\n"
|
||||
" -C check if a multipath device has usable paths\n"
|
||||
" -q allow queue_if_no_path when multipathd is not running\n"
|
||||
@@ -868,7 +870,7 @@ main (int argc, char *argv[])
|
||||
exit(1);
|
||||
@@ -879,7 +881,7 @@ main (int argc, char *argv[])
|
||||
exit(RTVL_FAIL);
|
||||
multipath_conf = conf;
|
||||
conf->retrigger_tries = 0;
|
||||
- while ((arg = getopt(argc, argv, ":adcChl::FfM:v:p:b:BrR:itTquUwW")) != EOF ) {
|
||||
@ -116,17 +116,17 @@ index 856202a..2c4054d 100644
|
||||
switch(arg) {
|
||||
case 1: printf("optarg : %s\n",optarg);
|
||||
break;
|
||||
@@ -938,6 +940,10 @@ main (int argc, char *argv[])
|
||||
@@ -949,6 +951,10 @@ main (int argc, char *argv[])
|
||||
case 'T':
|
||||
cmd = CMD_DUMP_CONFIG;
|
||||
break;
|
||||
+ case 'A':
|
||||
+ if (remember_cmdline_wwid() != 0)
|
||||
+ exit(1);
|
||||
+ exit(0);
|
||||
+ exit(RTVL_FAIL);
|
||||
+ exit(RTVL_OK);
|
||||
case 'h':
|
||||
usage(argv[0]);
|
||||
exit(0);
|
||||
exit(RTVL_OK);
|
||||
diff --git a/multipath/multipath.8 b/multipath/multipath.8
|
||||
index 9cdd05a..8befc45 100644
|
||||
--- a/multipath/multipath.8
|
@ -1,26 +1,24 @@
|
||||
Name: device-mapper-multipath
|
||||
Version: 0.7.9
|
||||
Release: 1%{?dist}
|
||||
Release: 2.git17a6101%{?dist}
|
||||
Summary: Tools to manage multipath devices using device-mapper
|
||||
License: GPLv2
|
||||
URL: http://christophe.varoqui.free.fr/
|
||||
|
||||
# The source for this package was pulled from upstream's git repo. Use the
|
||||
# following command to generate the tarball
|
||||
# curl "https://git.opensvc.com/?p=multipath-tools/.git;a=snapshot;h=refs/tags/0.7.9;sf=tgz" -o multipath-tools-0.7.9.tgz
|
||||
Source0: multipath-tools-0.7.9.tgz
|
||||
# curl "https://git.opensvc.com/?p=multipath-tools/.git;a=snapshot;h=17a6101;sf=tgz" -o multipath-tools-17a6101.tgz
|
||||
Source0: multipath-tools-17a6101.tgz
|
||||
Source1: multipath.conf
|
||||
Patch0001: 0001-multipathd-fix-mpp-hwe-handling-when-paths-are-freed.patch
|
||||
Patch0002: 0002-libmultipath-cleanup-pthread_cleanup_pop-call.patch
|
||||
Patch0003: 0003-libmultipath-fix-false-removes-in-dmevents-polling-c.patch
|
||||
Patch0004: 0004-RH-fixup-udev-rules-for-redhat.patch
|
||||
Patch0005: 0005-RH-Remove-the-property-blacklist-exception-builtin.patch
|
||||
Patch0006: 0006-RH-don-t-start-without-a-config-file.patch
|
||||
Patch0007: 0007-RH-use-rpm-optflags-if-present.patch
|
||||
Patch0008: 0008-RH-add-mpathconf.patch
|
||||
Patch0009: 0009-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch
|
||||
Patch0010: 0010-RH-warn-on-invalid-regex-instead-of-failing.patch
|
||||
Patch0011: 0011-RH-reset-default-find_mutipaths-value-to-off.patch
|
||||
Patch0001: 0001-libmultipath-dm_is_mpath-cleanup.patch
|
||||
Patch0002: 0002-RH-fixup-udev-rules-for-redhat.patch
|
||||
Patch0003: 0003-RH-Remove-the-property-blacklist-exception-builtin.patch
|
||||
Patch0004: 0004-RH-don-t-start-without-a-config-file.patch
|
||||
Patch0005: 0005-RH-use-rpm-optflags-if-present.patch
|
||||
Patch0006: 0006-RH-add-mpathconf.patch
|
||||
Patch0007: 0007-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch
|
||||
Patch0008: 0008-RH-warn-on-invalid-regex-instead-of-failing.patch
|
||||
Patch0009: 0009-RH-reset-default-find_mutipaths-value-to-off.patch
|
||||
|
||||
# runtime
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
@ -103,7 +101,7 @@ This package contains the files needed to develop applications that use
|
||||
device-mapper-multipath's libdmmp C API library
|
||||
|
||||
%prep
|
||||
%setup -q -n multipath-tools-0.7.9
|
||||
%setup -q -n multipath-tools-17a6101
|
||||
%patch0001 -p1
|
||||
%patch0002 -p1
|
||||
%patch0003 -p1
|
||||
@ -113,8 +111,6 @@ device-mapper-multipath's libdmmp C API library
|
||||
%patch0007 -p1
|
||||
%patch0008 -p1
|
||||
%patch0009 -p1
|
||||
%patch0010 -p1
|
||||
%patch0011 -p1
|
||||
cp %{SOURCE1} .
|
||||
|
||||
%build
|
||||
@ -230,6 +226,14 @@ fi
|
||||
%{_pkgconfdir}/libdmmp.pc
|
||||
|
||||
%changelog
|
||||
* Tue Jan 15 2019 Benjamin Marzinski <bmarzins@redhat.com> 0.7.9-2.git17a6101
|
||||
- Update Source to latest upstream commit
|
||||
* Previous patches 0001-0003 are included in this version
|
||||
- Rename files
|
||||
* Previous patches 0004-0011 are now patches 0002-0009
|
||||
- Add 0001-libmultipath-dm_is_mpath-cleanup.patch
|
||||
* This patch has been submitted upstream
|
||||
|
||||
* Mon Dec 3 2018 Benjamin Marzinski <bmarzins@redhat.com> 0.7.9-1
|
||||
- Update Source to upstream version 0.7.9
|
||||
* Previous patches 0001-0006 are included in this version
|
||||
|
2
sources
2
sources
@ -1,2 +1,2 @@
|
||||
SHA512 (multipath-tools-0.7.9.tgz) = 3595bb11ed7a52727308ba50b860a63e13c7640ed0c7289a460bcbd44c3a1b5e58c4619f22de4f212fb87498363186f0bccbcf8deb88e8ac9f1f217c414e93ec
|
||||
SHA512 (multipath-tools-17a6101.tgz) = 28c75188ac33aeae58457b56aa5890c277a437ee8a4b061ecaa1d766aa040c74e7c94036939edc3f293f6c795cb94c431540e8ac46ef2e81cecac7aef1fa0ac7
|
||||
SHA512 (multipath.conf) = 71953dce5a68adcf60a942305f5a66023e6f4c4baf53b1bfdb4edf65ed5b8e03db804363c36d1dcfd85591f4766f52b515269904c53b84d7b076da0b80b09942
|
||||
|
Loading…
Reference in New Issue
Block a user