[dm-devel] [PATCH 10/11] multipathd: add path when transitioned from 'blocked' state

Hannes Reinecke hare at suse.de
Fri Dec 13 12:14:13 UTC 2013


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 at suse.de>
---
 multipathd/main.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/multipathd/main.c b/multipathd/main.c
index 7058147..cc5cf67 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1111,9 +1111,6 @@ check_path (struct vectors * vecs, struct path * pp)
 	int chkr_new_path_up = 0;
 	int oldchkrstate = pp->chkrstate;
 
-	if (!pp->mpp)
-		return;
-
 	if (pp->tick && --pp->tick)
 		return; /* don't check this path yet */
 
@@ -1139,6 +1136,17 @@ check_path (struct vectors * vecs, struct path * pp)
 		pathinfo(pp, conf->hwtable, 0);
 		return;
 	}
+	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
-- 
1.8.1.4




More information about the dm-devel mailing list