summaryrefslogtreecommitdiff
path: root/multipathd
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2010-02-03 14:22:22 +0100
committerChristophe Varoqui <christophe.varoqui@free.fr>2010-02-03 15:29:57 +0100
commit88c75172cf56e78d87b56fe48627b2e1da4eff48 (patch)
treec13cffa8a070dcb6a6f97c21d5fa74fe61886cf9 /multipathd
parent53bf3a2b0086b1b7c2f3a62335569042f916f4ec (diff)
downloadmultipath-tools-88c75172cf56e78d87b56fe48627b2e1da4eff48.tar.gz
multipath-tools-88c75172cf56e78d87b56fe48627b2e1da4eff48.tar.bz2
multipath-tools-88c75172cf56e78d87b56fe48627b2e1da4eff48.zip
Update path_offline() to return device status
A SCSI device can have for more states than just 'offline' and 'running'. In fact, any device _not_ in state 'running' is unaccessible to I/O, so running a path checker on these devices will cause the checker to be delayed and hence stall the entire daemon. This patch updates the path_offline() function to return the actual device state. Path checkers will only be run if the state is PATH_UP. A 'blocked' device state will be translated into PATH_PENDING, causing the checkerloop to skip this device and recheck as soon as possible. Signed-off-by: Hannes Reinecke <hare@suse.de>
Diffstat (limited to 'multipathd')
-rw-r--r--multipathd/main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/multipathd/main.c b/multipathd/main.c
index e875d14..e7955bd 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -948,9 +948,8 @@ check_path (struct vectors * vecs, struct path * pp)
*/
checker_set_async(&pp->checker);
- if (path_offline(pp))
- newstate = PATH_DOWN;
- else
+ newstate = path_offline(pp);
+ if (newstate == PATH_UP)
newstate = checker_check(&pp->checker);
if (newstate < 0) {