diff mbox

[10/11] multipathd: add path when transitioned from 'blocked' state

Message ID 1386936854-8399-11-git-send-email-hare@suse.de (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show

Commit Message

Hannes Reinecke Dec. 13, 2013, 12:14 p.m. UTC
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 | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

Comments

Christophe Varoqui Dec. 13, 2013, 10:02 p.m. UTC | #1
Hannes,

I merged the patchset.

Can you post a patch to set return values to the
multipathd/main.c::patch_check() exit points where it is not present.
This 11/12 patch adds one, and the "proactive path removal" patch adds the
other.
This requirement was introduced by your earlier "check timing" patch.

Thanks,
Christophe Varoqui


On Fri, Dec 13, 2013 at 1:14 PM, Hannes Reinecke <hare@suse.de> wrote:

> 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 | 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
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
>
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
diff mbox

Patch

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