Blame SOURCES/0149-RHBZ-1292599-restore-removed-parts.patch

4ae388
---
4ae388
 libmultipath/configure.c |    8 ++++++--
4ae388
 libmultipath/structs.h   |    1 +
4ae388
 multipathd/main.c        |    1 +
4ae388
 3 files changed, 8 insertions(+), 2 deletions(-)
4ae388
4ae388
Index: multipath-tools-130222/libmultipath/configure.c
4ae388
===================================================================
4ae388
--- multipath-tools-130222.orig/libmultipath/configure.c
4ae388
+++ multipath-tools-130222/libmultipath/configure.c
4ae388
@@ -398,6 +398,7 @@ select_action (struct multipath * mpp, v
4ae388
 				cmpp->alias, mpp->alias);
4ae388
 			strncpy(mpp->alias_old, cmpp->alias, WWID_SIZE);
4ae388
 			mpp->action = ACT_RENAME;
4ae388
+			mpp->force_udev_reload = force_reload;
4ae388
 			if (force_reload)
4ae388
 				mpp->action = ACT_RENAME2;
4ae388
 			return;
4ae388
@@ -437,11 +438,13 @@ select_action (struct multipath * mpp, v
4ae388
 		return;
4ae388
 	}
4ae388
 	if (force_reload) {
4ae388
+		mpp->force_udev_reload = 1;
4ae388
 		mpp->action = ACT_RELOAD;
4ae388
 		condlog(3, "%s: set ACT_RELOAD (forced by user)",
4ae388
 			mpp->alias);
4ae388
 		return;
4ae388
 	}
4ae388
+	mpp->force_udev_reload = !pathcount(mpp, PATH_WILD);
4ae388
 	if (cmpp->size != mpp->size) {
4ae388
 		mpp->action = ACT_RESIZE;
4ae388
 		condlog(3, "%s: set ACT_RESIZE (size change)",
4ae388
@@ -651,7 +654,7 @@ domap (struct multipath * mpp, char * pa
4ae388
 	case ACT_RELOAD:
4ae388
 		r = dm_addmap_reload(mpp, params);
4ae388
 		if (r)
4ae388
-			r = dm_simplecmd_noflush(DM_DEVICE_RESUME, mpp->alias, MPATH_UDEV_RELOAD_FLAG);
4ae388
+			r = dm_simplecmd_noflush(DM_DEVICE_RESUME, mpp->alias, (mpp->force_udev_reload)? 0 : MPATH_UDEV_RELOAD_FLAG);
4ae388
 		break;
4ae388
 
4ae388
 	case ACT_RESIZE:
4ae388
@@ -669,7 +672,7 @@ domap (struct multipath * mpp, char * pa
4ae388
 		if (r) {
4ae388
 			r = dm_addmap_reload(mpp, params);
4ae388
 			if (r)
4ae388
-				r = dm_simplecmd_noflush(DM_DEVICE_RESUME, mpp->alias, MPATH_UDEV_RELOAD_FLAG);
4ae388
+				r = dm_simplecmd_noflush(DM_DEVICE_RESUME, mpp->alias, (mpp->force_udev_reload)? 0 : MPATH_UDEV_RELOAD_FLAG);
4ae388
 		}
4ae388
 		break;
4ae388
 
4ae388
@@ -682,6 +685,7 @@ domap (struct multipath * mpp, char * pa
4ae388
 		 * DM_DEVICE_CREATE, DM_DEVICE_RENAME, or DM_DEVICE_RELOAD
4ae388
 		 * succeeded
4ae388
 		 */
4ae388
+		mpp->force_udev_reload = 0;
4ae388
 		if (mpp->action == ACT_CREATE) {
4ae388
 			if (remember_wwid(mpp->wwid) == 1)
4ae388
 				trigger_uevents(mpp);
4ae388
Index: multipath-tools-130222/libmultipath/structs.h
4ae388
===================================================================
4ae388
--- multipath-tools-130222.orig/libmultipath/structs.h
4ae388
+++ multipath-tools-130222/libmultipath/structs.h
4ae388
@@ -234,6 +234,7 @@ struct multipath {
4ae388
 	int deferred_remove;
4ae388
 	int delay_watch_checks;
4ae388
 	int delay_wait_checks;
4ae388
+	int force_udev_reload;
4ae388
 	unsigned int dev_loss;
4ae388
 	uid_t uid;
4ae388
 	gid_t gid;
4ae388
Index: multipath-tools-130222/multipathd/main.c
4ae388
===================================================================
4ae388
--- multipath-tools-130222.orig/multipathd/main.c
4ae388
+++ multipath-tools-130222/multipathd/main.c
4ae388
@@ -554,6 +554,7 @@ rescan:
4ae388
 
4ae388
 		condlog(4,"%s: adopting all paths for path %s",
4ae388
 			mpp->alias, pp->dev);
4ae388
+		mpp->force_udev_reload = !pathcount(mpp, PATH_WILD);
4ae388
 		if (adopt_paths(vecs->pathvec, mpp, 1))
4ae388
 			goto fail; /* leave path added to pathvec */
4ae388