dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Martin Wilck <martin.wilck@suse.com>
To: "bmarzins@redhat.com" <bmarzins@redhat.com>,
	"christophe.varoqui@opensvc.com" <christophe.varoqui@opensvc.com>
Cc: "dm-devel@redhat.com" <dm-devel@redhat.com>
Subject: Re: [dm-devel] [PATCH v2 6/6] libmultipath: drop unnecessary parameter from remove_map()
Date: Fri, 3 Sep 2021 15:22:45 +0000	[thread overview]
Message-ID: <05c0b2e043dfb7e8e024f5ebefcec55bdb7b3762.camel@suse.com> (raw)
In-Reply-To: <933d61399192f5e5064054d29488680de0dc7970.camel@suse.com>

On Fri, 2021-09-03 at 11:28 +0200, Martin Wilck wrote:
> On Thu, 2021-09-02 at 16:57 -0500, Benjamin Marzinski wrote:
> > When remove_map() is called, if the multipath device is in a mpvec,
> > it
> > must be removed from it, because the device will be freed. Now that
> > the
> > mpvec is passed as a separate parameter to remove_map(), the
> > purge_vec
> > parameter is redundant.  It was only used by coalesce_paths(),
> > since
> > the
> > multipath device isn't on any vector when remove_map() is called
> > there.
> > Instead, remove_map() can just be called with a NULL mpvec, when
> > there
> > is no mpvec to remove the device from.
> > 
> > remove_map_by_alias() also has a redundant purge_vec parameter. 
> > Since
> > it only removes a map if it finds in on vec->mpvec, calling it with
> > KEEP_VEC would be a bug, since it would leave a pointer to the
> > freed
> > device in the vector.
> > 
> > Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> 
> Good catch. But we need to adapt libmultipath.version. I'll send a
> fix
> to be added on top.
> 
> Reviewed-by: Martin Wilck <mwilck@suse.com>

This breaks the directio test, too. We need a test patch on top.
I'm going to post it.

Martin


--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


  reply	other threads:[~2021-09-03 15:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-02 21:57 [dm-devel] [PATCH v2 0/6] Mulitpath: miscellaneous patches Benjamin Marzinski
2021-09-02 21:57 ` [dm-devel] [PATCH v2 1/6] multipath.conf: fix typo in ghost_delay description Benjamin Marzinski
2021-09-02 21:57 ` [dm-devel] [PATCH v2 2/6] mpathpersist: fail commands when no usable paths exist Benjamin Marzinski
2021-09-02 21:57 ` [dm-devel] [PATCH v2 3/6] multipath: print warning if multipathd is not running Benjamin Marzinski
2021-09-03  8:20   ` Martin Wilck
2021-09-02 21:57 ` [dm-devel] [PATCH v2 4/6] libmultipath: remove unneeded code in coalesce_paths Benjamin Marzinski
2021-09-02 21:57 ` [dm-devel] [PATCH v2 5/6] libmultipath: deal with dynamic PTHREAD_STACK_MIN Benjamin Marzinski
2021-09-02 21:57 ` [dm-devel] [PATCH v2 6/6] libmultipath: drop unnecessary parameter from remove_map() Benjamin Marzinski
2021-09-03  9:28   ` Martin Wilck
2021-09-03 15:22     ` Martin Wilck [this message]
2021-09-03 17:17       ` Benjamin Marzinski

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=05c0b2e043dfb7e8e024f5ebefcec55bdb7b3762.camel@suse.com \
    --to=martin.wilck@suse.com \
    --cc=bmarzins@redhat.com \
    --cc=christophe.varoqui@opensvc.com \
    --cc=dm-devel@redhat.com \
    --subject='Re: [dm-devel] [PATCH v2 6/6] libmultipath: drop unnecessary parameter from remove_map()' \
    /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

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).