]> git.ipfire.org Git - ipfire-3.x.git/blob - multipath-tools/patches/0028-RHBZ-929078-refresh-udev-dev.patch
krb5: Update to 1.14.4
[ipfire-3.x.git] / multipath-tools / patches / 0028-RHBZ-929078-refresh-udev-dev.patch
1 ---
2 libmultipath/discovery.c | 2 +-
3 multipathd/main.c | 19 ++++++++++++++++++-
4 2 files changed, 19 insertions(+), 2 deletions(-)
5
6 Index: multipath-tools-130222/libmultipath/discovery.c
7 ===================================================================
8 --- multipath-tools-130222.orig/libmultipath/discovery.c
9 +++ multipath-tools-130222/libmultipath/discovery.c
10 @@ -1034,7 +1034,7 @@ pathinfo (struct path *pp, vector hwtabl
11 }
12 }
13
14 - if (path_state == PATH_UP && (mask & DI_WWID) && !strlen(pp->wwid))
15 + if ((mask & DI_WWID) && !strlen(pp->wwid))
16 get_uid(pp);
17 if (mask & DI_BLACKLIST && mask & DI_WWID) {
18 if (filter_wwid(conf->blist_wwid, conf->elist_wwid,
19 Index: multipath-tools-130222/multipathd/main.c
20 ===================================================================
21 --- multipath-tools-130222.orig/multipathd/main.c
22 +++ multipath-tools-130222/multipathd/main.c
23 @@ -376,7 +376,7 @@ static int
24 uev_add_path (struct uevent *uev, struct vectors * vecs)
25 {
26 struct path *pp;
27 - int ret;
28 + int ret, i;
29
30 condlog(2, "%s: add path (uevent)", uev->kernel);
31 if (strstr(uev->kernel, "..") != NULL) {
32 @@ -393,6 +393,23 @@ uev_add_path (struct uevent *uev, struct
33 uev->kernel);
34 if (pp->mpp)
35 return 0;
36 + if (!strlen(pp->wwid)) {
37 + udev_device_unref(pp->udev);
38 + pp->udev = udev_device_ref(uev->udev);
39 + ret = pathinfo(pp, conf->hwtable,
40 + DI_ALL | DI_BLACKLIST);
41 + if (ret == 2) {
42 + i = find_slot(vecs->pathvec, (void *)pp);
43 + if (i != -1)
44 + vector_del_slot(vecs->pathvec, i);
45 + free_path(pp);
46 + return 0;
47 + } else if (ret == 1) {
48 + condlog(0, "%s: failed to reinitialize path",
49 + uev->kernel);
50 + return 1;
51 + }
52 + }
53 } else {
54 /*
55 * get path vital state