From bf4c80aee4e977e89d6925df569647acd3d5efef Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Fri, 13 Dec 2013 13:14:13 +0100 Subject: [PATCH] multipathd: add path when transitioned from 'blocked' state 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 --- multipathd/main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/multipathd/main.c b/multipathd/main.c index 92efc6c6..37a9bc2e 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -1142,6 +1142,17 @@ check_path (struct vectors * vecs, struct path * pp) 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 -- 2.20.1