libmultipath: uev_update_path: update path properties
authorMartin Wilck <mwilck@suse.com>
Wed, 7 Mar 2018 23:21:52 +0000 (00:21 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Sat, 10 Mar 2018 07:23:47 +0000 (08:23 +0100)
Update pp->udev and those path attributes that can be cheaply
updated from sysfs, i.e. without IO to the disk.

Signed-off-by: Martin Wilck <mwilck@suse.com>
multipathd/main.c

index e966820..6e6c52a 100644 (file)
@@ -964,6 +964,14 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
                                strcpy(pp->wwid, wwid);
                        else
                                pp->wwid_changed = 0;
+               } else {
+                       udev_device_unref(pp->udev);
+                       pp->udev = udev_device_ref(uev->udev);
+                       conf = get_multipath_config();
+                       if (pathinfo(pp, conf, DI_SYSFS|DI_NOIO) != PATHINFO_OK)
+                               condlog(1, "%s: pathinfo failed after change uevent",
+                                       uev->kernel);
+                       put_multipath_config(conf);
                }
 
                if (pp->initialized == INIT_REQUESTED_UDEV)