From: Brian Bunker <brian@purestorage.com>
To: dm-devel@lists.linux.dev
Cc: Benjamin Marzinski <bmarzins@redhat.com>,
Martin Wilck <mwilck@suse.com>,
Christophe Varoqui <christophe.varoqui@opensvc.com>,
Brian Bunker <brian@purestorage.com>
Subject: [PATCH v2 0/1] multipathd: verify udev WWIDs with the device before moving paths
Date: Thu, 29 Oct 2026 16:52:40 -0700 [thread overview]
Message-ID: <20261029235241.97614-1-brian@purestorage.com> (raw)
During an array controller failover on an iSCSI host, multipathd
briefly put a path to one LUN into the map of another LUN, and I/O
meant for the first LUN landed on the second. The host ran RHEL 9
device-mapper-multipath 0.8.7, but the code involved is essentially
unchanged in master. See the v1 cover letter for the full sequence.
Changes in v2, after Ben's review:
- ev_add_path() no longer double-checks the WWID on every add. Ben
was concerned about adding a check to perfectly normal adds, since
a SCSI device can report several identifiers in VPD 0x83 and
multipath's SG_IO code has to pick the same one udev does.
The need_do_map argument of uev_add_path() and ev_add_path() is now
enum path_add_mode, with a new PATH_ADD_REINIT value. It behaves
like PATH_ADD_MAP, and is passed only when a path is re-added from
uev_update_path(): after udev reported a changed WWID, or after
udev data was missing at first. Only then is the WWID checked
against the device. Ordinary adds never run the SG_IO check.
- The uev_update_path() check is unchanged. It only runs when the
WWID from udev differs from the cached one, and falls back to the
old behavior if the device doesn't confirm the cached WWID.
About how likely this is: we hit it because a test tool was opening
and closing the sd devices read-write many times a second, and with
udev's "watch" rule every close generates a change uevent that runs
scsi_id against the device. That is far more udev traffic than a
normal host generates, so we expect the window to be rare in practice.
We don't know why the bad WWID was reported; the array may have
answered the INQUIRY wrongly during the takeover, or the bad value may
have arisen elsewhere in the udev path. What the patch does is stop
multipathd from acting on a changed WWID without confirming it, since
the result of acting on a wrong one is data going to the wrong LUN.
Open points, as in v1:
- If the SG_IO read fails, behavior is unchanged. Refusing the add in
that case would be stricter; opinions welcome.
- "multipathd reconfigure" builds maps through configure(), not
ev_add_path(), so it isn't covered.
Brian Bunker (1):
multipathd: verify udev WWIDs with the device before moving paths
multipathd/cli_handlers.c | 2 +-
multipathd/main.c | 79 +++++++++++++++++++++++++++++++--------
multipathd/main.h | 12 +++++-
3 files changed, 76 insertions(+), 17 deletions(-)
--
2.56.0
next reply other threads:[~2026-10-29 23:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-29 23:52 Brian Bunker [this message]
2026-10-29 23:52 ` [PATCH v2 1/1] multipathd: verify udev WWIDs with the device before moving paths Brian Bunker
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=20261029235241.97614-1-brian@purestorage.com \
--to=brian@purestorage.com \
--cc=bmarzins@redhat.com \
--cc=christophe.varoqui@opensvc.com \
--cc=dm-devel@lists.linux.dev \
--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 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.