Linux Device Mapper development
 help / color / mirror / Atom feed
From: "Benjamin Marzinski" <bmarzins@redhat.com>
To: Martin Wilck <mwilck@suse.com>
Cc: device-mapper development <dm-devel@redhat.com>
Subject: Re: [PATCH 7/7] multipath: print sysfs state in fast list mode
Date: Thu, 8 Feb 2018 13:06:33 -0600	[thread overview]
Message-ID: <20180208190633.GT14513@octiron.msp.redhat.com> (raw)
In-Reply-To: <1518082326.15245.54.camel@suse.com>

On Thu, Feb 08, 2018 at 10:32:06AM +0100, Martin Wilck wrote:
> Hi Ben,
> 
> On Wed, 2018-02-07 at 16:49 -0600, Benjamin Marzinski wrote:
> > commit b123e711ea2a4b471a98ff5e26815df3773636b5 "libmultipath:
> > cleanup
> > orphan device states" stopped multipathd from showing old state for
> > orphan paths by checking if pp->mpp was set, and only printing the
> > state
> > if it was.   Unfortunately, when "multipath -l" is run, pp->mpp isn't
> > set. While the checker state isn't checked and shouldn't be printed
> > with
> > "-l", the sysfs state can be, and was before b123e711. This patch
> > sets
> > pp->mpp in fast list mode, so that the sysfs state gets printed.
> > 
> > Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> > ---
> >  multipath/main.c | 9 ++++++---
> >  1 file changed, 6 insertions(+), 3 deletions(-)
> > 
> > diff --git a/multipath/main.c b/multipath/main.c
> > index bffe065..1799fd5 100644
> > --- a/multipath/main.c
> > +++ b/multipath/main.c
> > @@ -149,7 +149,7 @@ usage (char * progname)
> >  }
> >  
> >  static int
> > -update_paths (struct multipath * mpp)
> > +update_paths (struct multipath * mpp, int quick)
> >  {
> >  	int i, j;
> >  	struct pathgroup * pgp;
> > @@ -164,6 +164,10 @@ update_paths (struct multipath * mpp)
> >  			continue;
> >  
> >  		vector_foreach_slot (pgp->paths, pp, j) {
> > +			if (quick) {
> > +				pp->mpp = mpp;
> > +				continue;
> > +			}
> >  			if (!strlen(pp->dev)) {
> >  				if (devt2devname(pp->dev, 
> 
> Shouldn't you check whether the paths are still present in sysfs, like
> the code for the general case (quick == false) does?

Sure. It will make multipath paths that don't exist in sysfs show up
with a checker state of "faulty", instead of "undef" like was previously
the case for all paths in the quick list, but that seems like an
improvement.

> 
> Regards
> Martin
> 
> -- 
> Dr. Martin Wilck <mwilck@suse.com>, Tel. +49 (0)911 74053 2107
> SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
> HRB 21284 (AG Nürnberg)

      reply	other threads:[~2018-02-08 19:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-07 22:49 [PATCH 0/7] multipath: miscellaneous bug fixes Benjamin Marzinski
2018-02-07 22:49 ` [PATCH 1/7] multipath: fix tur checker locking Benjamin Marzinski
2018-02-08  8:49   ` Martin Wilck
2018-02-08 17:52     ` Benjamin Marzinski
2018-02-08 18:20       ` Bart Van Assche
2018-02-08 18:19   ` Bart Van Assche
2018-02-08 19:27     ` Benjamin Marzinski
2018-02-08 19:34       ` Bart Van Assche
2018-02-07 22:49 ` [PATCH 2/7] multipath: fix DEF_TIMEOUT use Benjamin Marzinski
2018-02-08  8:52   ` Martin Wilck
2018-02-07 22:49 ` [PATCH 3/7] multipathd: remove coalesce_paths from ev_add_map Benjamin Marzinski
2018-02-08  9:10   ` Martin Wilck
2018-02-08 18:00     ` Benjamin Marzinski
2018-02-07 22:49 ` [PATCH 4/7] multipathd: remove unused configure parameter Benjamin Marzinski
2018-02-08  9:13   ` Martin Wilck
2018-02-07 22:49 ` [PATCH 5/7] Fix set_no_path_retry() regression Benjamin Marzinski
2018-02-08  9:21   ` Martin Wilck
2018-02-08 18:31     ` Benjamin Marzinski
2018-02-07 22:49 ` [PATCH 6/7] multipathd: change spurious uevent msg priority Benjamin Marzinski
2018-02-08  9:23   ` Martin Wilck
2018-02-07 22:49 ` [PATCH 7/7] multipath: print sysfs state in fast list mode Benjamin Marzinski
2018-02-08  9:32   ` Martin Wilck
2018-02-08 19:06     ` Benjamin Marzinski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180208190633.GT14513@octiron.msp.redhat.com \
    --to=bmarzins@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=mwilck@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox