Blame SOURCES/0028-RHBZ-929078-refresh-udev-dev.patch

671555
---
671555
 libmultipath/discovery.c |    2 +-
671555
 multipathd/main.c        |   19 ++++++++++++++++++-
671555
 2 files changed, 19 insertions(+), 2 deletions(-)
671555
671555
Index: multipath-tools-130222/libmultipath/discovery.c
671555
===================================================================
671555
--- multipath-tools-130222.orig/libmultipath/discovery.c
671555
+++ multipath-tools-130222/libmultipath/discovery.c
671555
@@ -1034,7 +1034,7 @@ pathinfo (struct path *pp, vector hwtabl
671555
 		}
671555
 	}
671555
 
671555
-	if (path_state == PATH_UP && (mask & DI_WWID) && !strlen(pp->wwid))
671555
+	if ((mask & DI_WWID) && !strlen(pp->wwid))
671555
 		get_uid(pp);
671555
 	if (mask & DI_BLACKLIST && mask & DI_WWID) {
671555
 		if (filter_wwid(conf->blist_wwid, conf->elist_wwid,
671555
Index: multipath-tools-130222/multipathd/main.c
671555
===================================================================
671555
--- multipath-tools-130222.orig/multipathd/main.c
671555
+++ multipath-tools-130222/multipathd/main.c
671555
@@ -376,7 +376,7 @@ static int
671555
 uev_add_path (struct uevent *uev, struct vectors * vecs)
671555
 {
671555
 	struct path *pp;
671555
-	int ret;
671555
+	int ret, i;
671555
 
671555
 	condlog(2, "%s: add path (uevent)", uev->kernel);
671555
 	if (strstr(uev->kernel, "..") != NULL) {
671555
@@ -393,6 +393,23 @@ uev_add_path (struct uevent *uev, struct
671555
 			uev->kernel);
671555
 		if (pp->mpp)
671555
 			return 0;
671555
+		if (!strlen(pp->wwid)) {
671555
+			udev_device_unref(pp->udev);
671555
+			pp->udev = udev_device_ref(uev->udev);
671555
+			ret = pathinfo(pp, conf->hwtable,
671555
+				       DI_ALL | DI_BLACKLIST);
671555
+			if (ret == 2) {
671555
+				i = find_slot(vecs->pathvec, (void *)pp);
671555
+				if (i != -1)
671555
+					vector_del_slot(vecs->pathvec, i);
671555
+				free_path(pp);
671555
+				return 0;
671555
+			} else if (ret == 1) {
671555
+				condlog(0, "%s: failed to reinitialize path",
671555
+					uev->kernel);
671555
+				return 1;
671555
+			}
671555
+		}
671555
 	} else {
671555
 		/*
671555
 		 * get path vital state