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

4ae388
---
4ae388
 multipathd/main.c |   15 +++++++++++----
4ae388
 1 file changed, 11 insertions(+), 4 deletions(-)
4ae388
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
@@ -530,9 +530,15 @@ ev_add_path (struct path * pp, struct ve
4ae388
 	}
4ae388
 	mpp = find_mp_by_wwid(vecs->mpvec, pp->wwid);
4ae388
 	if (mpp && mpp->wait_for_udev) {
4ae388
-		mpp->wait_for_udev = 2;
4ae388
-		orphan_path(pp);
4ae388
-		return 0;
4ae388
+		if (pathcount(mpp, PATH_UP) == 0 &&
4ae388
+		    (pathcount(mpp, PATH_GHOST) == 0 ||
4ae388
+		     pp->tpgs == TPGS_IMPLICIT))
4ae388
+			mpp->force_udev_reload = 1;
4ae388
+		else {
4ae388
+			mpp->wait_for_udev = 2;
4ae388
+			orphan_path(pp);
4ae388
+			return 0;
4ae388
+		}
4ae388
 	}
4ae388
 
4ae388
 	pp->mpp = mpp;
4ae388
@@ -551,7 +557,8 @@ 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 (pathcount(mpp, PATH_WILD) == 0)
4ae388
+			mpp->force_udev_reload = 1;
4ae388
 		if (adopt_paths(vecs->pathvec, mpp, 1))
4ae388
 			goto fail; /* leave path added to pathvec */
4ae388