diff mbox

[23/42] Path checker should return PATH_DOWN when no path is found

Message ID 1357653259-62650-24-git-send-email-hare@suse.de (mailing list archive)
State Deferred, archived
Headers show

Commit Message

Hannes Reinecke Jan. 8, 2013, 1:54 p.m. UTC
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 |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 6848b70..7ed8556 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -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);