device-mapper-multipath/0083-RHBZ-1080055-orphan-paths-on-reload.patch
Benjamin Marzinski efd38c93e9 device-mapper-multipath-0.4.9-68
Modify multipath.conf
  * remove getuid_callout example
Re-add 0050-RH-listing-speedup.patch
Add 0081-RHBZ-1066264-check-prefix-on-rename.patch
  * make multipath check the prefix on kpartx partitions during rename, and
    copy the existing behaviour
Add 0082-UPBZ-1109995-no-sync-turs-on-pthread_cancel.patch
  * If async tur checker fails on threads, don't retry with the sync version
Add 0083-RHBZ-1080055-orphan-paths-on-reload.patch
  * Fix case where pathlist wasn't getting updated properly
Add 0084-RHBZ-1110000-multipath-man.patch
  * fix errors in multipath man page
Add 0085-UPBZ-1110006-datacore-config.patch
  * Add support for DataCore Virtual Disk
Add 0086-RHBZ-1110007-orphan-path-on-failed-add.patch
  * If multipathd fails to add path correctly, it now fully orphans the path
Add 0087-RHBZ-1110013-config-error-checking.patch
  * Improve multipath.conf error checking.
Add 0088-RHBZ-1069811-configurable-prio-timeout.patch
  * checker_timeout now adjusts the timeouts of the prioritizers as well.
Add 0089-RHBZ-1110016-add-noasync-option.patch
  * Add a new defaults option, "force_sync", that disables the async mode
    of the path checkers. This is for cases where to many parallel checkers
    hog the cpu
Add 0090-UPBZ-1080038-reorder-paths-for-round-robin.patch
  * make multipathd order paths for better throughput in round-robin mode
Add 0091-RHBZ-1069584-fix-empty-values-fast-io-fail-and-dev-loss.patch
  * check for null pointers in configuration reading code.
Add 0092-UPBZ-1104605-reload-on-rename.patch
  * Reload table on rename if necessary
Add 0093-UPBZ-1086825-user-friendly-name-remap.patch
  * Keep existing user_friend_name if possible
Add 0094-RHBZ-1086825-cleanup-remap.patch
  * Cleanup issues with upstream patch
Add 0095-RHBZ-1127944-xtremIO-config.patch
  * Add support for EMC ExtremIO devices
Add 0096-RHBZ-979474-new-wildcards.patch
  * Add N, n, R, and r path wildcards to print World Wide ids
Add 0097-RH-fix-coverity-errors.patch
  * Fix a number of unterminated strings and memory leaks on failure
    paths.
Add 0098-UPBZ-1067171-mutipath-i.patch
  * Add -i option to ignore wwids file when checking for valid paths
Add 0099-RH-add-all-devs.patch
  * Add new devices config option all_devs. This makes the configuration
    overwrite the specified values in all builtin configs
Add 0100-RHBZ-1067171-multipath-i-update.patch
  * make -i work correctly with find_multipaths
Add 0101-RH-adapter-name-wildcard.patch
  * Add 'a' path wildcard to print adapter name
2014-09-16 18:22:40 -05:00

86 lines
2.2 KiB
Diff

---
libmultipath/structs_vec.c | 31 +++++++++++++++++++++++++++----
multipathd/main.c | 4 ++++
2 files changed, 31 insertions(+), 4 deletions(-)
Index: multipath-tools-130222/libmultipath/structs_vec.c
===================================================================
--- multipath-tools-130222.orig/libmultipath/structs_vec.c
+++ multipath-tools-130222/libmultipath/structs_vec.c
@@ -280,12 +280,38 @@ update_multipath_status (struct multipat
return 0;
}
+void sync_paths(struct multipath *mpp, vector pathvec)
+{
+ struct path *pp;
+ struct pathgroup *pgp;
+ int found, i, j;
+
+ vector_foreach_slot (mpp->paths, pp, i) {
+ found = 0;
+ vector_foreach_slot(mpp->pg, pgp, j) {
+ if (find_slot(pgp->paths, (void *)pp) != -1) {
+ found = 1;
+ break;
+ }
+ }
+ if (!found) {
+ condlog(3, "%s dropped path %s", mpp->alias, pp->dev);
+ vector_del_slot(mpp->paths, i--);
+ orphan_path(pp);
+ }
+ }
+ update_mpp_paths(mpp, pathvec);
+ vector_foreach_slot (mpp->paths, pp, i)
+ pp->mpp = mpp;
+}
+
extern int
update_multipath_strings (struct multipath *mpp, vector pathvec)
{
if (!mpp)
return 1;
+ update_mpp_paths(mpp, pathvec);
condlog(4, "%s: %s", mpp->alias, __FUNCTION__);
free_multipath_attributes(mpp);
@@ -294,6 +320,7 @@ update_multipath_strings (struct multipa
if (update_multipath_table(mpp, pathvec))
return 1;
+ sync_paths(mpp, pathvec);
if (update_multipath_status(mpp))
return 1;
@@ -494,13 +521,9 @@ int update_multipath (struct vectors *ve
return 2;
}
- free_pgvec(mpp->pg, KEEP_PATHS);
- mpp->pg = NULL;
-
if (__setup_multipath(vecs, mpp, reset))
return 1; /* mpp freed in setup_multipath */
- adopt_paths(vecs->pathvec, mpp, 0);
/*
* compare checkers states with DM states
*/
Index: multipath-tools-130222/multipathd/main.c
===================================================================
--- multipath-tools-130222.orig/multipathd/main.c
+++ multipath-tools-130222/multipathd/main.c
@@ -1152,6 +1152,10 @@ check_path (struct vectors * vecs, struc
pp->dev);
pp->dmstate = PSTATE_UNDEF;
}
+ /* if update_multipath_strings orphaned the path, quit early */
+ if (!pp->mpp)
+ return;
+
pp->chkrstate = newstate;
if (newstate != pp->state) {
int oldstate = pp->state;