[dm-devel] [PATCH v2 6/6] multipathd: cleanup logging for marginal paths

Benjamin Marzinski bmarzins at redhat.com
Mon Jan 18 20:32:32 UTC 2021


On Fri, Jan 15, 2021 at 01:55:09PM +0000, Martin Wilck wrote:
> On Thu, 2021-01-14 at 20:20 -0600, Benjamin Marzinski wrote:
> > io_err_stat logged at level 2 whenever it enqueued a path to check,
> > which could happen multiple times while a path was marginal.  On the
> > other hand if marginal_pathgroups wasn't set, multipathd didn't log
> > when
> > paths were set to marginal. Now io_err_stat only logs at level 2 when
> > something unexpected happens, but multipathd will always log when a
> > path switches its marginal state.
> > 
> > Signed-off-by: Benjamin Marzinski <bmarzins at redhat.com>

> > diff --git a/multipathd/main.c b/multipathd/main.c
> > index 92c45d44..99a89a69 100644
> > --- a/multipathd/main.c
> > +++ b/multipathd/main.c
> > @@ -2132,8 +2132,8 @@ check_path (struct vectors * vecs, struct path
> > * pp, unsigned int ticks)
> >                 pathinfo(pp, conf, 0);
> >                 pthread_cleanup_pop(1);
> >                 return 1;
> > -       } else if ((newstate != PATH_UP && newstate != PATH_GHOST) &&
> > -                       (pp->state == PATH_DELAYED)) {
> > +       } else if ((newstate != PATH_UP && newstate != PATH_GHOST &&
> > +                   newstate != PATH_PENDING) && (pp->state ==
> > PATH_DELAYED)) {
> 
> I think this is correct, but it needs to  be mentioned in the commit
> message (or go into a separate patch).

It needs to go in this patch. Without it, devices in the delayed state
can change to pending, and then back again. The code logs another
message every time this happens. But I can add an explanation to the
commit message.

I'll make a v3 release with just this patch.

-Ben
 
> Regards,
> Martin
> 
> 
> -- 
> Dr. Martin Wilck <mwilck at suse.com>, Tel. +49 (0)911 74053 2107
> SUSE Software Solutions Germany GmbH
> HRB 36809, AG Nürnberg GF: Felix Imendörffer
> 




More information about the dm-devel mailing list