multipathd: add path when transitioned from 'blocked' state
authorHannes Reinecke <hare@suse.de>
Fri, 13 Dec 2013 12:14:13 +0000 (13:14 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Fri, 13 Dec 2013 21:58:58 +0000 (22:58 +0100)
When a path is discovered in 'blocked' state it won't be added
to the path list as we cannot get the path uuid.
And any further check will fail here as the uuid won't be
recovered. So add a check in checkerloop() to re-add the
path if it gets out of a 'blocked' state.

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

index 92efc6c..37a9bc2 100644 (file)
@@ -1142,6 +1142,17 @@ check_path (struct vectors * vecs, struct path * pp)
                pathinfo(pp, conf->hwtable, 0);
                return 1;
        }
                pathinfo(pp, conf->hwtable, 0);
                return 1;
        }
+       if (!pp->mpp) {
+               if (!strlen(pp->wwid) &&
+                   (newstate == PATH_UP || newstate == PATH_GHOST)) {
+                       condlog(2, "%s: add missing path", pp->dev);
+                       if (pathinfo(pp, conf->hwtable, DI_ALL) == 0) {
+                               ev_add_path(pp, vecs);
+                               pp->tick = 1;
+                       }
+               }
+               return;
+       }
        /*
         * Async IO in flight. Keep the previous path state
         * and reschedule as soon as possible
        /*
         * Async IO in flight. Keep the previous path state
         * and reschedule as soon as possible