dm-devel.redhat.com archive mirror
 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 04/12] libmultipath: cleanup features handling code
Date: Fri, 8 Dec 2017 15:12:07 -0600	[thread overview]
Message-ID: <20171208211207.GC5638@octiron.msp.redhat.com> (raw)
In-Reply-To: <1512746692.11972.67.camel@suse.com>

On Fri, Dec 08, 2017 at 04:24:52PM +0100, Martin Wilck wrote:
> On Thu, 2017-12-07 at 12:48 -0600, Benjamin Marzinski wrote:
> 
> > retain_attached_hw_handler was never getting updated before, so
> > the output when you created a map was incorrect.
> 
> While I've already ACKed your patch, I don't understand what you mean
> here. Before your patch, "retain_attached_hw_handler" was set from
> config options and correctly copied to the features string in
> assemble_map, no?
> 

It is correctly copied to the features string you send to the kernel. It
was not copied to the multipath object that the multipath program is
dealing with.  So if you run "multipath" and it creates the device, what
is prints out as the device it created will not include
"retain_attached_hw_handler", even if it did send that feature to the
kernel.  If you run "multipath -l" afterwards, you will see that the
device does have "retain_attached_hw_handler" set.  This doesn't happen
with queue_if_no_path because of the add_feature() call in the code
below.  That goes through and adds "queue_if_no_path" back to the
features string of the multipath object that multipath will using to
print its output on creation.  Of course, none of that matters on newer
kernels anyway, because we will remove "retain_attached_hw_handler" from
the features line, since that behaviour is automatic now.

> > diff --git a/libmultipath/configure.c b/libmultipath/configure.c
> > index 0dfa250..7ca84b8 100644
> > --- a/libmultipath/configure.c
> > +++ b/libmultipath/configure.c
> > @@ -1060,21 +1062,6 @@ int coalesce_paths (struct vectors * vecs,
> > vector newmp, char * refwwid,
> >  				remove_feature(&mpp->features,
> >  					       "queue_if_no_path");
> >  		}
> > -		else if (mpp->no_path_retry != NO_PATH_RETRY_UNDEF)
> > {
> > -			if (mpp->no_path_retry ==
> > NO_PATH_RETRY_FAIL) {
> > -				condlog(3, "%s: unset
> > queue_if_no_path feature",
> > -					mpp->alias);
> > -				if (!dm_queue_if_no_path(mpp->alias, 
> > 0))
> > -					remove_feature(&mpp-
> > >features,
> > -						       "queue_if_no_
> > path");
> > -			} else {
> > -				condlog(3, "%s: set queue_if_no_path
> > feature",
> > -					mpp->alias);
> > -				if (!dm_queue_if_no_path(mpp->alias, 
> > 1))
> > -					add_feature(&mpp->features,
> > -						    "queue_if_no_pat
> > h");
> > -			}
> > -		}
> 
> AFAICS we could also get rid of the calls to dm_queue_if_no_path() in 
> reload_map(), right?

Oops. I meant to remove it there as well. Good catch. I'll send a
follow-up patch.

-Ben

> 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:[~2017-12-08 21:12 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07 18:48 [PATCH 00/12] Misc fixes Benjamin Marzinski
2017-12-07 18:48 ` [PATCH 01/12] multipath: add "ghost_delay" parameter Benjamin Marzinski
2017-12-07 22:08   ` Martin Wilck
2017-12-07 18:48 ` [PATCH 02/12] kpartx: don't delete partitions from partitions Benjamin Marzinski
2017-12-07 22:09   ` Martin Wilck
2017-12-07 18:48 ` [PATCH 03/12] multipath: fix hwhandler check in select_action Benjamin Marzinski
2017-12-07 22:09   ` Martin Wilck
2017-12-07 18:48 ` [PATCH 04/12] libmultipath: cleanup features handling code Benjamin Marzinski
2017-12-07 22:10   ` Martin Wilck
2017-12-08 15:24   ` Martin Wilck
2017-12-08 21:12     ` Benjamin Marzinski [this message]
2017-12-07 18:48 ` [PATCH 05/12] multipathd: move helper functions to libmultipath Benjamin Marzinski
2017-12-07 22:11   ` Martin Wilck
2017-12-07 18:49 ` [PATCH 06/12] multipathd: fix device creation issues Benjamin Marzinski
2017-12-08 17:26   ` Martin Wilck
2018-01-30 16:51   ` Martin Wilck
2018-01-30 18:34     ` Benjamin Marzinski
2018-01-30 19:02       ` Martin Wilck
2017-12-07 18:49 ` [PATCH 07/12] multipathd: remove select_* from setup_multipath Benjamin Marzinski
2017-12-08 20:08   ` Martin Wilck
2017-12-07 18:49 ` [PATCH 08/12] libmultipath: __setup_multipath param cleanup Benjamin Marzinski
2017-12-08 20:13   ` Martin Wilck
2017-12-07 18:49 ` [PATCH 09/12] multipathd: move recovery mode code to function Benjamin Marzinski
2017-12-07 22:13   ` Martin Wilck
2017-12-07 18:49 ` [PATCH 10/12] multipathd: clean up set_no_path_retry Benjamin Marzinski
2017-12-07 22:14   ` Martin Wilck
2017-12-07 18:49 ` [PATCH 11/12] multipath: check failed path dmstate in check_path Benjamin Marzinski
2017-12-07 22:14   ` Martin Wilck
2017-12-07 18:49 ` [PATCH 12/12] multipathd: marginal path code fixes Benjamin Marzinski
2017-12-07 22:15   ` Martin Wilck
2018-01-13  9:19 ` [PATCH 00/12] Misc fixes Christophe Varoqui

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=20171208211207.GC5638@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;
as well as URLs for NNTP newsgroup(s).