All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] multipathd: always reset checker interval for failed paths
@ 2025-05-22  0:26 Benjamin Marzinski
  2025-05-23 11:00 ` Martin Wilck
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Marzinski @ 2025-05-22  0:26 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: device-mapper development, Martin Wilck

The are multiple places in the code that can set pp->state to
PATH_DOWN without resetting pp->checkint, most obviously when
a path is failed by update_multipath(). When this happens the
path will continue to be checked at its previous interval,
instead of switching back to conf->checkint. Fix these cases
by always resetting the pp->checkint to conf->checkint when
updating the state of a failed path.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
 multipathd/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/multipathd/main.c b/multipathd/main.c
index d4928d80..2d5c146d 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -2711,6 +2711,7 @@ update_path_state (struct vectors * vecs, struct path * pp)
 			else
 				LOG_MSG(2, pp);
 		}
+		pp->checkint = checkint;
 	}
 	if (pp->mpp->prio_update == PRIO_UPDATE_NONE &&
 	    (newstate == PATH_UP || newstate == PATH_GHOST))
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] multipathd: always reset checker interval for failed paths
  2025-05-22  0:26 [PATCH] multipathd: always reset checker interval for failed paths Benjamin Marzinski
@ 2025-05-23 11:00 ` Martin Wilck
  2025-05-23 11:04   ` Martin Wilck
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Wilck @ 2025-05-23 11:00 UTC (permalink / raw)
  To: Benjamin Marzinski, Christophe Varoqui; +Cc: device-mapper development

On Wed, 2025-05-21 at 20:26 -0400, Benjamin Marzinski wrote:
> The are multiple places in the code that can set pp->state to
> PATH_DOWN without resetting pp->checkint, most obviously when
> a path is failed by update_multipath(). When this happens the
> path will continue to be checked at its previous interval,
> instead of switching back to conf->checkint. Fix these cases
> by always resetting the pp->checkint to conf->checkint when
> updating the state of a failed path.
> 
> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>

> ---
>  multipathd/main.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/multipathd/main.c b/multipathd/main.c
> index d4928d80..2d5c146d 100644
> --- a/multipathd/main.c
> +++ b/multipathd/main.c
> @@ -2711,6 +2711,7 @@ update_path_state (struct vectors * vecs,
> struct path * pp)
>  			else
>  				LOG_MSG(2, pp);
>  		}
> +		pp->checkint = checkint;
>  	}
>  	if (pp->mpp->prio_update == PRIO_UPDATE_NONE &&
>  	    (newstate == PATH_UP || newstate == PATH_GHOST))

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] multipathd: always reset checker interval for failed paths
  2025-05-23 11:00 ` Martin Wilck
@ 2025-05-23 11:04   ` Martin Wilck
  2025-05-28  2:01     ` Benjamin Marzinski
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Wilck @ 2025-05-23 11:04 UTC (permalink / raw)
  To: Benjamin Marzinski, Christophe Varoqui; +Cc: device-mapper development

On Fri, 2025-05-23 at 13:00 +0200, Martin Wilck wrote:
> On Wed, 2025-05-21 at 20:26 -0400, Benjamin Marzinski wrote:
> > The are multiple places in the code that can set pp->state to
> > PATH_DOWN without resetting pp->checkint, most obviously when
> > a path is failed by update_multipath(). When this happens the
> > path will continue to be checked at its previous interval,
> > instead of switching back to conf->checkint. Fix these cases
> > by always resetting the pp->checkint to conf->checkint when
> > updating the state of a failed path.
> > 
> > Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> Reviewed-by: Martin Wilck <mwilck@suse.com>

Although this patch has no fixes: tag, I'll consider it for the stable
branches. Objections?

Martin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] multipathd: always reset checker interval for failed paths
  2025-05-23 11:04   ` Martin Wilck
@ 2025-05-28  2:01     ` Benjamin Marzinski
  0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Marzinski @ 2025-05-28  2:01 UTC (permalink / raw)
  To: Martin Wilck; +Cc: Christophe Varoqui, device-mapper development

On Fri, May 23, 2025 at 01:04:15PM +0200, Martin Wilck wrote:
> On Fri, 2025-05-23 at 13:00 +0200, Martin Wilck wrote:
> > On Wed, 2025-05-21 at 20:26 -0400, Benjamin Marzinski wrote:
> > > The are multiple places in the code that can set pp->state to
> > > PATH_DOWN without resetting pp->checkint, most obviously when
> > > a path is failed by update_multipath(). When this happens the
> > > path will continue to be checked at its previous interval,
> > > instead of switching back to conf->checkint. Fix these cases
> > > by always resetting the pp->checkint to conf->checkint when
> > > updating the state of a failed path.
> > > 
> > > Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> > Reviewed-by: Martin Wilck <mwilck@suse.com>
> 
> Although this patch has no fixes: tag, I'll consider it for the stable
> branches. Objections?

Yeah. It makes sense for the stable branches.

-Ben

> 
> Martin


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-05-28  2:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-22  0:26 [PATCH] multipathd: always reset checker interval for failed paths Benjamin Marzinski
2025-05-23 11:00 ` Martin Wilck
2025-05-23 11:04   ` Martin Wilck
2025-05-28  2:01     ` Benjamin Marzinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.