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