diff options
| author | Benjamin Marzinski <bmarzins@redhat.com> | 2018-02-15 13:17:53 -0600 |
|---|---|---|
| committer | Benjamin Marzinski <bmarzins@redhat.com> | 2018-02-15 13:17:53 -0600 |
| commit | 5bea53fe7ed7dd7afa8e76f7f84f76fdb89d59d9 (patch) | |
| tree | 9a89c87df6336311ebe30ae2c51af13f92d6a3d6 /0008-libmultipath-move-remove_map-waiter-code-to-multipat.patch | |
| parent | 7e8f34e1813a9ae89b5acc012fa7d45c3d7bbdb8 (diff) | |
| download | device-mapper-multipath-master.tar.gz device-mapper-multipath-master.tar.xz device-mapper-multipath-master.zip | |
device-mapper-multipath-0.7.4-1.git07e7bd5master
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
Diffstat (limited to '0008-libmultipath-move-remove_map-waiter-code-to-multipat.patch')
| -rw-r--r-- | 0008-libmultipath-move-remove_map-waiter-code-to-multipat.patch | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/0008-libmultipath-move-remove_map-waiter-code-to-multipat.patch b/0008-libmultipath-move-remove_map-waiter-code-to-multipat.patch new file mode 100644 index 0000000..314b7c0 --- /dev/null +++ b/0008-libmultipath-move-remove_map-waiter-code-to-multipat.patch @@ -0,0 +1,148 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski <bmarzins@redhat.com> +Date: Mon, 5 Feb 2018 16:07:36 -0600 +Subject: [PATCH] libmultipath: move remove_map waiter code to multipathd + +Only multipathd needs to worry about the multipath waiter code. There is +no point in having remove_map_and_stop_waiter() or +remove_maps_and_stop_waiters() in libmultipath, since they should never +be use outside of multipathd. + +Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> +--- + libmultipath/structs_vec.c | 40 +++++----------------------------------- + libmultipath/structs_vec.h | 2 -- + multipathd/main.c | 23 +++++++++++++++++++++++ + 3 files changed, 28 insertions(+), 37 deletions(-) + +diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c +index 0de2221..abf5327 100644 +--- a/libmultipath/structs_vec.c ++++ b/libmultipath/structs_vec.c +@@ -116,25 +116,16 @@ set_multipath_wwid (struct multipath * mpp) + dm_get_uuid(mpp->alias, mpp->wwid); + } + +-#define KEEP_WAITER 0 +-#define STOP_WAITER 1 + #define PURGE_VEC 1 + +-static void +-_remove_map (struct multipath * mpp, struct vectors * vecs, +- int stop_waiter, int purge_vec) ++void ++remove_map(struct multipath * mpp, struct vectors * vecs, int purge_vec) + { + int i; + + condlog(4, "%s: remove multipath map", mpp->alias); + + /* +- * stop the DM event waiter thread +- */ +- if (stop_waiter) +- stop_waiter_thread(mpp, vecs); +- +- /* + * clear references to this map + */ + orphan_paths(vecs->pathvec, mpp); +@@ -149,19 +140,8 @@ _remove_map (struct multipath * mpp, struct vectors * vecs, + free_multipath(mpp, KEEP_PATHS); + } + +-void remove_map(struct multipath *mpp, struct vectors *vecs, int purge_vec) +-{ +- _remove_map(mpp, vecs, KEEP_WAITER, purge_vec); +-} +- +-void remove_map_and_stop_waiter(struct multipath *mpp, struct vectors *vecs, +- int purge_vec) +-{ +- _remove_map(mpp, vecs, STOP_WAITER, purge_vec); +-} +- +-static void +-_remove_maps (struct vectors * vecs, int stop_waiter) ++void ++remove_maps(struct vectors * vecs) + { + int i; + struct multipath * mpp; +@@ -170,7 +150,7 @@ _remove_maps (struct vectors * vecs, int stop_waiter) + return; + + vector_foreach_slot (vecs->mpvec, mpp, i) { +- _remove_map(mpp, vecs, stop_waiter, 1); ++ remove_map(mpp, vecs, 1); + i--; + } + +@@ -178,16 +158,6 @@ _remove_maps (struct vectors * vecs, int stop_waiter) + vecs->mpvec = NULL; + } + +-void remove_maps(struct vectors *vecs) +-{ +- _remove_maps(vecs, KEEP_WAITER); +-} +- +-void remove_maps_and_stop_waiters(struct vectors *vecs) +-{ +- _remove_maps(vecs, STOP_WAITER); +-} +- + void + extract_hwe_from_path(struct multipath * mpp) + { +diff --git a/libmultipath/structs_vec.h b/libmultipath/structs_vec.h +index b81413b..d6e17bb 100644 +--- a/libmultipath/structs_vec.h ++++ b/libmultipath/structs_vec.h +@@ -27,9 +27,7 @@ int update_multipath_strings (struct multipath *mpp, vector pathvec, + void extract_hwe_from_path(struct multipath * mpp); + + void remove_map (struct multipath * mpp, struct vectors * vecs, int purge_vec); +-void remove_map_and_stop_waiter (struct multipath * mpp, struct vectors * vecs, int purge_vec); + void remove_maps (struct vectors * vecs); +-void remove_maps_and_stop_waiters (struct vectors * vecs); + + void sync_map_state (struct multipath *); + int update_map (struct multipath *mpp, struct vectors *vecs); +diff --git a/multipathd/main.c b/multipathd/main.c +index 7ac59d9..72c3c2f 100644 +--- a/multipathd/main.c ++++ b/multipathd/main.c +@@ -288,6 +288,29 @@ switch_pathgroup (struct multipath * mpp) + mpp->alias, mpp->bestpg); + } + ++static void ++remove_map_and_stop_waiter(struct multipath *mpp, struct vectors *vecs, ++ int purge_vec) ++{ ++ stop_waiter_thread(mpp, vecs); ++ remove_map(mpp, vecs, purge_vec); ++} ++ ++static void ++remove_maps_and_stop_waiters(struct vectors *vecs) ++{ ++ int i; ++ struct multipath * mpp; ++ ++ if (!vecs) ++ return; ++ ++ vector_foreach_slot(vecs->mpvec, mpp, i) ++ stop_waiter_thread(mpp, vecs); ++ ++ remove_maps(vecs); ++} ++ + static int + coalesce_maps(struct vectors *vecs, vector nmpv) + { +-- +2.7.4 + |
