libmultipath: coalesce_paths: improve logging of orphaned paths
authorMartin Wilck <mwilck@suse.com>
Fri, 2 Nov 2018 12:21:23 +0000 (13:21 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 14 Nov 2018 07:21:49 +0000 (08:21 +0100)
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Martin Wilck <mwilck@suse.com>
libmultipath/configure.c

index 09c3dcf..ed3e30f 100644 (file)
@@ -1020,14 +1020,18 @@ int coalesce_paths (struct vectors * vecs, vector newmp, char * refwwid,
                }
        }
        vector_foreach_slot (pathvec, pp1, k) {
-               int invalid = 0;
+               int invalid;
                /* skip this path for some reason */
 
                /* 1. if path has no unique id or wwid blacklisted */
+               if (strlen(pp1->wwid) == 0) {
+                       orphan_path(pp1, "no WWID");
+                       continue;
+               }
+
                conf = get_multipath_config();
                pthread_cleanup_push(put_multipath_config, conf);
-               if (strlen(pp1->wwid) == 0 || filter_path(conf, pp1) > 0)
-                       invalid = 1;
+               invalid = (filter_path(conf, pp1) > 0);
                pthread_cleanup_pop(1);
                if (invalid) {
                        orphan_path(pp1, "blacklisted");