All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Bunker <brian@purestorage.com>
To: Martin Wilck <mwilck@suse.com>
Cc: Brian Bunker <brian@purestorage.com>,
	Benjamin Marzinski <bmarzins@redhat.com>,
	Christophe Varoqui <christophe.varoqui@opensvc.com>,
	dm-devel@lists.linux.dev
Subject: Re: [PATCH v2 1/1] multipathd: verify udev WWIDs with the device before moving paths
Date: Mon,  9 Nov 2026 10:57:56 -0800	[thread overview]
Message-ID: <20261109185757.27498-1-brian@purestorage.com> (raw)
In-Reply-To: <f9a399429d9c7ac2e4079e7cd89ae7c304ee3b24.camel@suse.com>

On Fri, 2026-11-06, Martin Wilck wrote:
> You will need convince me that this doesn't do more harm than good.
> We can't just use udev in one place and other methods elsewhere.
>
> I am open for a general redesign that uses sysfs for retrieving
> WWIDs, rather than udev. But using SG_IO seems wrong to me in general,
> because it can hang.

Agreed on SG_IO. v3 drops it: the re-add check compares the udev WWID
with one built from the VPD page 0x83 data cached in sysfs, using the
same get_vpd_uid()/parse_vpd_pg83() code as the existing sysfs
fallback in get_uid(). It does no I/O on the device.

On mixing methods, one thing I should have said earlier: on RHEL 9 the
udev WWID isn't taken from sysfs. The RHEL sg3_utils package installs
55-scsi-sg3_id.rules as 61-scsi-sg3_id.rules ("need to run after
60-persistent-storage.rules"), so ID_SERIAL comes from
"scsi_id --whitelisted", which sends INQUIRY over SG_IO; strace on our
host shows it on every run. The bad WWID came from that INQUIRY.

Where the sg3 rules run first, ID_SERIAL is derived from the same
sysfs page the check reads, with the same designator selection when
everything is at defaults, and can_recheck_wwid() limits the check to
that case. So I'd argue it isn't another way of computing the WWID,
but a comparison of udev's value with the data it is meant to come
from.

I also dropped the uev_update_path() check from v2. With cached data
it could keep a path to a really remapped LUN in its old map, which is
worse than the problem it was meant to fix.

> I wouldn't call this a valid test. It's a deliberate abuse of udev
> functionality.

Fair. The tool doing this is ours, and we've changed it to open the
devices read-only, which stops the flood of change events in our
testing. The reason
I'd still like multipathd to check the re-add is that when it goes
wrong, the result is silent data corruption on another LUN, and
nothing else in the stack notices.

> Thinking about it, I wonder if we should simply set "nowatch" for
> multipath members by default.

I think that's worth doing regardless of this patch, and I'm happy to
look at it separately.

Brian

  reply	other threads:[~2026-11-09 18:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 23:52 [PATCH v2 0/1] multipathd: verify udev WWIDs with the device before moving paths Brian Bunker
2026-10-29 23:52 ` [PATCH v2 1/1] " Brian Bunker
2026-10-30 18:09   ` Benjamin Marzinski
2026-11-06 22:19     ` Martin Wilck
2026-11-09 18:57       ` Brian Bunker [this message]
2026-11-09 20:26       ` 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=20261109185757.27498-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.