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

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