From: Benjamin Marzinski <bmarzins@redhat.com>
To: Martin Wilck <martin.wilck@suse.com>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>,
device-mapper development <dm-devel@lists.linux.dev>
Subject: Re: [PATCH 1/2] libmutipath: handle blacklisted paths on map_discovery
Date: Tue, 29 Apr 2025 16:27:13 -0400 [thread overview]
Message-ID: <aBE2IX4re8qXv-GG@redhat.com> (raw)
In-Reply-To: <d277b26e716775ef3778aa47c8a96ea24a551de7.camel@suse.com>
On Tue, Apr 29, 2025 at 09:59:40PM +0200, Martin Wilck wrote:
> On Mon, 2025-04-28 at 17:45 -0400, Benjamin Marzinski wrote:
> > If the multipath configuration is changed to blacklist existing
> > devices,
> > and multipathd is reloaded but the blacklisted multipaths device
> > can't
> > be removed, multipathd was marking the paths as INIT_PARTIAL, causing
> > them to stay in the multipath device, at least until the
> > partial_retrigger_delay timeout elapsed. Instead, mark them as
> > INIT_REMOVED and set mpp->need_reload, so the device is reloaded and
> > the
> > paths are removed. To make sure the blacklisted paths are deleted
> > when
> > the multipath device is removed in coalesce_maps(), set their pp->mpp
> > to point to map before removing it.
> >
> > Fixes d9c61332 ("multipathd: trigger uevents for blacklisted paths in
> > reconfigure")
>
> The patch looks good to me, but I only vaguely understand why the bug
> is introduced in d9c61332. Are you positive that before d9c61332, the
> hang didn't occur?
Well, I'm pretty sure these blacklisted paths stopped getting deleted
during reconfigure by d9c61332. Before d9c61332, blacklisted paths were
immediately deleted in update_pathvec_from_dm(). After this change
@@ -193,7 +196,8 @@ static void update_pathvec_from_dm(vector pathvec, struct multipath *mpp,
rc = pathinfo(pp, conf,
DI_SYSFS|DI_WWID|DI_BLACKLIST|DI_NOFALLBACK|pathinfo_flags);
pthread_cleanup_pop(1);
- if (rc != PATHINFO_OK) {
+ if (rc == PATHINFO_FAILED ||
+ (rc == PATHINFO_SKIPPED && !map_discovery)) {
condlog(1, "%s: error %d in pathinfo, discarding path",
pp->dev, rc);
vector_del_slot(pgp->paths, j--);
they started hanging around, so that uevents could be generated for them
by trigger_paths_udev_change(). However, since coalesce_paths() will
usually clear pp->mpp, they won't get removed when orphan_paths() is
later called by remove_maps() to remove the old maps. I admit I didn't
test if the paths got removed before that commit, but the commit message
says that they did.
-Ben
>
> >
> > Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
>
> Reviewed-by: Martin Wilck <mwilck@suse.com>
next prev parent reply other threads:[~2025-04-29 20:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-28 21:45 [PATCH 0/2] Handle blacklisted maps on reconfigure Benjamin Marzinski
2025-04-28 21:45 ` [PATCH 1/2] libmutipath: handle blacklisted paths on map_discovery Benjamin Marzinski
2025-04-29 19:59 ` Martin Wilck
2025-04-29 20:27 ` Benjamin Marzinski [this message]
2025-04-30 7:55 ` Coding stye (was Re: [PATCH 1/2] libmutipath: handle blacklisted paths on map_discovery) Martin Wilck
2025-04-30 15:22 ` Benjamin Marzinski
2025-04-30 19:09 ` Martin Wilck
2025-04-28 21:45 ` [PATCH 2/2] multipathd: disable queueing on invalid multipath devices Benjamin Marzinski
2025-04-29 20:00 ` Martin Wilck
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=aBE2IX4re8qXv-GG@redhat.com \
--to=bmarzins@redhat.com \
--cc=christophe.varoqui@opensvc.com \
--cc=dm-devel@lists.linux.dev \
--cc=martin.wilck@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 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.