5bea53fe7e
Update Source to the latest upstream commit * Previous patches 0001-0006 are included in this commit * Previous patches 0007-0014 are now patches 0015-0022 Add 0001-libmultipath-fix-tur-checker-locking.patch * Fixed spinlock bug. posted upstream Add 0002-multipath-fix-DEF_TIMEOUT-use.patch * Add missing sec to ms conversion. posted upstream Add 0003-multipathd-remove-coalesce_paths-from-ev_add_map.patch * Remove unused code. posted upstream Add 0004-multipathd-remove-unused-configure-parameter.patch * Remove unused code. posted upstream Add 0005-Fix-set_no_path_retry-regression.patch * Fix issue with queueing and path addition. posted upstream Add 0006-multipathd-change-spurious-uevent-msg-priority.patch * Change message priority to Notice. posted upstream Add 0007-multipath-print-sysfs-state-in-fast-list-mode.patch * Show sysfs state correctly in fast list mode (-l). posted upstream Add 0008-libmultipath-move-remove_map-waiter-code-to-multipat.patch * Move code around. posted upstream Add 0009-move-waiter-code-from-libmultipath-to-multipathd.patch * Move code around. posted upstream Add 0010-call-start_waiter_thread-before-setup_multipath.patch * Fix race on multipath device creations. posted upstream Add 0011-libmultipath-add-helper-functions.patch * posted upstream Add 0012-multipathd-RFC-add-new-polling-dmevents-waiter-threa.patch * Add alternate method of getting dmevents, that doesn't require a thread per device. posted upstream Add 0013-libmultipath-condlog-log-to-stderr.patch * change condlog to log to stderr instead of stdout. posted upstream Add 0014-multipathd-fix-compiler-warning-for-uev_pathfail_che.patch * fix indentation issue. posted upstream
99 lines
2.9 KiB
Diff
99 lines
2.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
Date: Fri, 19 Jan 2018 22:35:26 -0600
|
|
Subject: [PATCH] multipathd: remove coalesce_paths from ev_add_map
|
|
|
|
If ev_add_map is called for a multipath device that doesn't exist in
|
|
device-mapper, it will call coalesce_paths to add it. This doesn't work
|
|
and hasn't for years. It doesn't add the map to the mpvec, or start up
|
|
waiters, or do any of the necessary things that do get done when you
|
|
call ev_add_map for a map that does exist in device mapper.
|
|
|
|
Fortunately, there are only two things that call ev_add_map. uev_add_map
|
|
makes sure that the device does exist in device-mapper before calling
|
|
ev_add_map, and cli_add_map creates the device first and then calls
|
|
ev_add_map, if the device doesn't exist.
|
|
|
|
So, there is no reason for coalesce_paths to be in ev_add_map. This
|
|
removes it.
|
|
|
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
---
|
|
multipathd/main.c | 46 ++++++++++++++--------------------------------
|
|
1 file changed, 14 insertions(+), 32 deletions(-)
|
|
|
|
diff --git a/multipathd/main.c b/multipathd/main.c
|
|
index 27cf234..dbf9890 100644
|
|
--- a/multipathd/main.c
|
|
+++ b/multipathd/main.c
|
|
@@ -412,18 +412,19 @@ uev_add_map (struct uevent * uev, struct vectors * vecs)
|
|
return rc;
|
|
}
|
|
|
|
+/*
|
|
+ * ev_add_map expects that the multipath device already exists in kernel
|
|
+ * before it is called. It just adds a device to multipathd or updates an
|
|
+ * existing device.
|
|
+ */
|
|
int
|
|
ev_add_map (char * dev, char * alias, struct vectors * vecs)
|
|
{
|
|
- char * refwwid;
|
|
struct multipath * mpp;
|
|
- int map_present;
|
|
- int r = 1, delayed_reconfig, reassign_maps;
|
|
+ int delayed_reconfig, reassign_maps;
|
|
struct config *conf;
|
|
|
|
- map_present = dm_map_present(alias);
|
|
-
|
|
- if (map_present && !dm_is_mpath(alias)) {
|
|
+ if (!dm_is_mpath(alias)) {
|
|
condlog(4, "%s: not a multipath map", alias);
|
|
return 0;
|
|
}
|
|
@@ -468,33 +469,14 @@ ev_add_map (char * dev, char * alias, struct vectors * vecs)
|
|
/*
|
|
* now we can register the map
|
|
*/
|
|
- if (map_present) {
|
|
- if ((mpp = add_map_without_path(vecs, alias))) {
|
|
- sync_map_state(mpp);
|
|
- condlog(2, "%s: devmap %s registered", alias, dev);
|
|
- return 0;
|
|
- } else {
|
|
- condlog(2, "%s: uev_add_map failed", dev);
|
|
- return 1;
|
|
- }
|
|
- }
|
|
- r = get_refwwid(CMD_NONE, dev, DEV_DEVMAP, vecs->pathvec, &refwwid);
|
|
-
|
|
- if (refwwid) {
|
|
- r = coalesce_paths(vecs, NULL, refwwid, FORCE_RELOAD_NONE,
|
|
- CMD_NONE);
|
|
- dm_lib_release();
|
|
+ if ((mpp = add_map_without_path(vecs, alias))) {
|
|
+ sync_map_state(mpp);
|
|
+ condlog(2, "%s: devmap %s registered", alias, dev);
|
|
+ return 0;
|
|
+ } else {
|
|
+ condlog(2, "%s: ev_add_map failed", dev);
|
|
+ return 1;
|
|
}
|
|
-
|
|
- if (!r)
|
|
- condlog(2, "%s: devmap %s added", alias, dev);
|
|
- else if (r == 2)
|
|
- condlog(2, "%s: uev_add_map %s blacklisted", alias, dev);
|
|
- else
|
|
- condlog(0, "%s: uev_add_map %s failed", alias, dev);
|
|
-
|
|
- FREE(refwwid);
|
|
- return r;
|
|
}
|
|
|
|
static int
|
|
--
|
|
2.7.4
|
|
|