Path checker should return PATH_DOWN when no path is found
authorHannes Reinecke <hare@suse.de>
Tue, 8 Jan 2013 13:54:01 +0000 (14:54 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Tue, 8 Jan 2013 22:48:19 +0000 (23:48 +0100)
If the path checker fails to lookup the path in sysfs it's
already gone, so we should rather return 'PATH_DOWN' here.
Otherwise the path will never marked failed and no failover
will happen.

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath/discovery.c

index 6848b70..7ed8556 100644 (file)
@@ -659,11 +659,11 @@ path_offline (struct path * pp)
 
        if (!parent) {
                condlog(1, "%s: failed to get sysfs information", pp->dev);
-               return PATH_WILD;
+               return PATH_DOWN;
        }
 
        if (sysfs_get_state(parent, buff, SCSI_STATE_SIZE))
-               return PATH_WILD;
+               return PATH_DOWN;
 
        condlog(3, "%s: path state = %s", pp->dev, buff);