[multipath] don't exit if pathvec is empty after discovery
authorChristophe Varoqui <root@xa-s05.(none)>
Fri, 30 Sep 2005 08:25:06 +0000 (10:25 +0200)
committerChristophe Varoqui <root@xa-s05.(none)>
Fri, 30 Sep 2005 08:25:06 +0000 (10:25 +0200)
When all path fail or are removed by operator, but the maps are still
present, expected behaviour is for "multipath -l" to work.

IOW outs something like :

xa-s05:~/scm/multipath-tools-0.4.6# multipath/multipath -l
149455400000000000000000002000000d00600000b000000 ()
[size=67 GB][features="0"][hwhandler="0"]
\_ round-robin 0 [enabled]
 \_ 10:0:0:1 sdd 8:48 [active]

149455400000000000000000002000000d20600000b000000 ()
[size=33 GB][features="0"][hwhandler="0"]
\_ round-robin 0 [enabled]
 \_ 10:0:0:2 sde 8:64 [active]

xa-s05:~/scm/multipath-tools-0.4.6# iscsiadm -m node --logout --record=0203b2
xa-s05:~/scm/multipath-tools-0.4.6# multipath/multipath -l
149455400000000000000000002000000d00600000b000000 ()
[size=67 GB][features="0"][hwhandler="0"]
\_ round-robin 0 [enabled]
 \_ #:#:#:#   8:48 [active]

149455400000000000000000002000000d20600000b000000 ()
[size=33 GB][features="0"][hwhandler="0"]
\_ round-robin 0 [enabled]
 \_ #:#:#:#   8:64 [active]

multipath/main.c

index 170bb2f..cafacae 100644 (file)
@@ -994,7 +994,7 @@ main (int argc, char *argv[])
                /* maximum info */
                di_flag = DI_ALL;
 
-       if (path_discovery(pathvec, conf, di_flag) || VECTOR_SIZE(pathvec) == 0)
+       if (path_discovery(pathvec, conf, di_flag))
                goto out;
 
        if (conf->verbosity > 2) {