multipathd: don't resend change events for unknown devices
authorBenjamin Marzinski <bmarzins@redhat.com>
Wed, 13 Feb 2019 22:55:08 +0000 (16:55 -0600)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Thu, 14 Feb 2019 17:53:12 +0000 (18:53 +0100)
If multipath fails to get the wwid for a device, and the device is
of an unknown type (pp->bus == SYSFS_BUS_UNDEF), don't send change
events. Instead, assume that the device was not meant to be used
and skip it.

Reviewed-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
libmultipath/discovery.c

index 6aef188..10bd8cd 100644 (file)
@@ -1966,6 +1966,8 @@ int pathinfo(struct path *pp, struct config *conf, int mask)
        if ((mask & DI_WWID) && !strlen(pp->wwid)) {
                get_uid(pp, path_state, pp->udev);
                if (!strlen(pp->wwid)) {
+                       if (pp->bus == SYSFS_BUS_UNDEF)
+                               return PATHINFO_SKIPPED;
                        if (pp->initialized != INIT_FAILED) {
                                pp->initialized = INIT_MISSING_UDEV;
                                pp->tick = conf->retrigger_delay;