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

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