Blame SOURCES/0172-RHBZ-1350931-no-active-add.patch

f20720
---
f20720
 multipathd/main.c |   15 +++++++++++----
f20720
 1 file changed, 11 insertions(+), 4 deletions(-)
f20720
f20720
Index: multipath-tools-130222/multipathd/main.c
f20720
===================================================================
f20720
--- multipath-tools-130222.orig/multipathd/main.c
f20720
+++ multipath-tools-130222/multipathd/main.c
f20720
@@ -530,9 +530,15 @@ ev_add_path (struct path * pp, struct ve
f20720
 	}
f20720
 	mpp = find_mp_by_wwid(vecs->mpvec, pp->wwid);
f20720
 	if (mpp && mpp->wait_for_udev) {
f20720
-		mpp->wait_for_udev = 2;
f20720
-		orphan_path(pp);
f20720
-		return 0;
f20720
+		if (pathcount(mpp, PATH_UP) == 0 &&
f20720
+		    (pathcount(mpp, PATH_GHOST) == 0 ||
f20720
+		     pp->tpgs == TPGS_IMPLICIT))
f20720
+			mpp->force_udev_reload = 1;
f20720
+		else {
f20720
+			mpp->wait_for_udev = 2;
f20720
+			orphan_path(pp);
f20720
+			return 0;
f20720
+		}
f20720
 	}
f20720
 
f20720
 	pp->mpp = mpp;
f20720
@@ -551,7 +557,8 @@ rescan:
f20720
 
f20720
 		condlog(4,"%s: adopting all paths for path %s",
f20720
 			mpp->alias, pp->dev);
f20720
-		mpp->force_udev_reload = !pathcount(mpp, PATH_WILD);
f20720
+		if (pathcount(mpp, PATH_WILD) == 0)
f20720
+			mpp->force_udev_reload = 1;
f20720
 		if (adopt_paths(vecs->pathvec, mpp, 1))
f20720
 			goto fail; /* leave path added to pathvec */
f20720