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

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