From: Benjamin Marzinski <bmarzins@redhat.com>
To: Martin Wilck <mwilck@suse.com>
Cc: device-mapper development <dm-devel@redhat.com>
Subject: Re: [PATCH v2 07/12] multipathd: ignore failed wwid recheck
Date: Tue, 19 Mar 2019 12:13:53 -0500 [thread overview]
Message-ID: <20190319171353.GG13295@octiron.msp.redhat.com> (raw)
In-Reply-To: <17d16e1ae0b183405707a719eb661e33ae7b05ec.camel@suse.com>
On Fri, Mar 15, 2019 at 12:48:49PM +0100, Martin Wilck wrote:
> On Fri, 2019-03-08 at 17:12 -0600, Benjamin Marzinski wrote:
> > If disable_changed_wwids is set, when multipathd gets a change event
> > on
> > a path, it verifies that the wwid hasn't changed in
> > uev_update_path().
> > If get_uid() failed, uev_update_path treated this as a wwid change to
> > 0.
> > This could cause paths to suddenly be dropped due to an issue with
> > getting the wwid. Even if get_uid() failed because the path was
> > down,
> > it no change uevent happend when it later became active, multipathd
> > would continue to ignore the path. Also, scsi_uid_fallback() clears
> > the
> > failure return if it doesn't attempt to fallback, causing get_uid()
> > to return success, when it actually failed.
> >
> > Multipathd should neither set nor clear wwid_changed if get_uid()
> > returned failure. Also, scsi_uid_fallback() should retain the old
> > return
> > value if it doesn't attempt to fallback.
> >
> > Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> > ---
> > libmultipath/discovery.c | 6 +++---
> > multipathd/main.c | 6 ++++--
> > 2 files changed, 7 insertions(+), 5 deletions(-)
> >
> > diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
> > index 729bcb9..b08cb2d 100644
> > --- a/libmultipath/discovery.c
> > +++ b/libmultipath/discovery.c
> > @@ -1755,9 +1755,9 @@ get_vpd_uid(struct path * pp)
> > }
> >
> > static ssize_t scsi_uid_fallback(struct path *pp, int path_state,
> > - const char **origin)
> > + const char **origin, ssize_t old_len)
> > {
> > - ssize_t len = 0;
> > + ssize_t len = old_len;
> > int retrigger;
> > struct config *conf;
>
> Please don't call this variable "old_len" but "errcode" or the like. If
> this is called, "old_len" is always negative (indicating a previous
> error) or 0 (indicating previous attempts returned an empty WWID, which
> is also likely an error).
Sure.
> Otherwise, ACK. But you revert most of this later in 12/12; I think the
> two should be merged (except for the scsi_uid_fallback part, maybe).
See my reply to your "New approach at handling changed WWIDs" patches.
Something like this patch is still my preferred solution, for reasons I
explain there.
-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)
>
next prev parent reply other threads:[~2019-03-19 17:13 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-08 23:11 [PATCH v2 00/12] Misc Multipath patches Benjamin Marzinski
2019-03-08 23:11 ` [PATCH v2 01/12] libmultipath: disable user_friendly_names for NetApp Benjamin Marzinski
2019-03-17 15:04 ` Xose Vazquez Perez
2019-03-18 9:45 ` Martin Wilck
2019-03-08 23:11 ` [PATCH v2 02/12] libmultipath: handle existing paths in marginal_path enqueue Benjamin Marzinski
2019-03-08 23:11 ` [PATCH v2 03/12] multipathd: cleanup marginal paths checking timers Benjamin Marzinski
2019-03-08 23:11 ` [PATCH v2 04/12] libmultipath: fix marginal paths queueing errors Benjamin Marzinski
2019-03-08 23:11 ` [PATCH v2 05/12] libmultipath: fix marginal_paths nr_active check Benjamin Marzinski
2019-03-08 23:11 ` [PATCH v2 06/12] multipathd: Fix miscounting active paths Benjamin Marzinski
2019-03-08 23:12 ` [PATCH v2 07/12] multipathd: ignore failed wwid recheck Benjamin Marzinski
2019-03-15 11:48 ` Martin Wilck
2019-03-19 17:13 ` Benjamin Marzinski [this message]
2019-03-08 23:12 ` [PATCH v2 08/12] libmutipath: continue to use old state on PATH_PENDING Benjamin Marzinski
2019-03-08 23:12 ` [PATCH v2 09/12] multipathd: use update_path_groups instead of reload_map Benjamin Marzinski
2019-03-15 11:49 ` Martin Wilck
2019-03-08 23:12 ` [PATCH v2 10/12] multipath.conf: add missing options to man page Benjamin Marzinski
2019-03-15 11:49 ` Martin Wilck
2019-03-19 17:14 ` Benjamin Marzinski
2019-03-08 23:12 ` [PATCH v2 11/12] libmultipath: add get_uid fallback code for NVMe devices Benjamin Marzinski
2019-03-15 11:49 ` Martin Wilck
2019-03-19 17:15 ` Benjamin Marzinski
2019-03-20 7:55 ` Martin Wilck
2019-03-08 23:12 ` [PATCH v2 12/12] multipathd: change failed get_uid handling Benjamin Marzinski
2019-03-15 11:50 ` Martin Wilck
2019-03-19 17:20 ` 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=20190319171353.GG13295@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