From: Martin Wilck <mwilck@suse.com>
To: Benjamin Marzinski <bmarzins@redhat.com>,
Christoph Hellwig <hch@infradead.org>
Cc: Kevin Wolf <kwolf@redhat.com>,
dm-devel@lists.linux.dev, hreitz@redhat.com,
mpatocka@redhat.com, snitzer@kernel.org,
linux-kernel@vger.kernel.org, pbonzini@redhat.com,
Hannes Reinecke <hare@suse.com>
Subject: Re: [PATCH 0/2] dm mpath: Interface for explicit probing of active paths
Date: Wed, 14 May 2025 19:37:19 +0200 [thread overview]
Message-ID: <50beb356b4dc000446fd186ab754c87f386eaeae.camel@suse.com> (raw)
In-Reply-To: <aCTDiHMuMncwdp_X@redhat.com>
Hello Ben, hello Christoph,
On Wed, 2025-05-14 at 12:23 -0400, Benjamin Marzinski wrote:
> On Tue, May 13, 2025 at 09:57:51PM -0700, Christoph Hellwig wrote:
> >
> > SG_IO is fine and the only way for SCSI passthrough. But doing
> > SCSI passthrough through md-multipath just doesn't work. SCSI
> > isn't
> > built for layering, and ALUA and it's vendor-specific variants and
> > alternatives certainly isn't. If you try that you're playing with
> > fire and is not chance of ever moving properly.
>
> Could you be a bit more specific. All multipath is doing here is
> forwarding the ioctls to an underlying scsi device, and passing back
> up
> the result. Admittedly, it doesn't always make sense to pass the
> ioctl
> on from the multipath device to just one scsi device. Persistent
> Reservations are perfect example of this, and that's why QEMU doesn't
> use DMs ioctl passthrough code to handle them.
I'd go one step further. Christoph is right to say that what we're
currently doing in qemu – passing through every command except the
PRIN/PROUT to a multipath device – is a dangerous thing to do.
Passthrough from a dm-multipath device to a SCSI device makes sense
only for a small subset of the SCSI command set. Basically just for the
regular IO commands like the various READ and WRITE variants and the
occasional UNMAP. However, in practice these commands account for 99.y%
percent of the actual commands sent to devices. The fact that customers
have been running these setups in large deployments over many years
suggests that, if other commands ever get passed through to member
devices, it has rarely had fatal consequences.
Nobody would seriously consider sending ALUA commands to the multipath
devices. TUR and REQUEST SENSE are other examples for commands that
can't be reasonably passed through to random member devices of a
multipath map. There are certainly many more examples. I guess it would
make sense to review the command set and add some filtering in the qemu
passthrough code.
AFAIK the only commands that we really need to pass through (except the
standard ones) are the reservation commands, which get special handling
by qemu anyway. @Ben, @Kevin, are you aware of anything else?
So: admittedly we're using a framework for passing through any command,
where we actually need to pass through only a tiny subset of commands.
Thinking about it this way, it really doesn't look like the perfect
tool for the job, and we may want to look into a different approach for
the future.
> Also, when you have ALUA
> setups, not all the scsi devices are equal. But multipath isn't
> naievely
> assuming that they are. It's only passing ioctls to the highest
> priority
> activated paths, just like it does for IO, and multipath is in charge
> of
> handling explicit alua devices. This hasn't proved to be problematic
> in
> practice.
>
> The reality of the situation is that customers have been using this
> for
> a while, and the only issue that they run into is that multipath
> can't
> tell when a SG_IO has failed due to a retryable error. Currently,
> they're left with waiting for multipathd's preemptive path checking
> to
> fail the path so they can retry down a new one. The purpose of this
> patchset and Martin's previous one is to handle this problem. If
> there
> are unavoidable critical problems that you see with this setup, it
> would
> be really helpful to know what they are.
I'd also be interested in understanding this better. As noted above,
I'm aware that passing through everything is dangerous and wrong in
principle. But in practice, we haven't observed anything serious except
(as Ben already said) the failure to do path failover in the SG_IO code
path, which both this patch set and my set from the past are intended
to fix.
While I am open for looking for better alternatives, I still hope that
we can find an agreement for a short/mid-term solution that would allow
us to serve our customers who currently use SCSI passthrough setups.
That would not just benefit us (the enterprise distros), because it
would also help us fund upstream contributions.
Regards
Martin
next prev parent reply other threads:[~2025-05-14 17:37 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 16:50 Kevin Wolf
2025-04-29 16:50 ` [PATCH 1/2] dm: Allow .prepare_ioctl to handle ioctls directly Kevin Wolf
2025-04-29 23:22 ` Benjamin Marzinski
2025-05-08 13:50 ` Martin Wilck
2025-04-29 16:50 ` [PATCH 2/2] dm mpath: Interface for explicit probing of active paths Kevin Wolf
2025-04-29 23:22 ` Benjamin Marzinski
2025-05-08 13:51 ` [PATCH 0/2] " Martin Wilck
2025-05-12 13:46 ` Mikulas Patocka
2025-05-13 7:06 ` Martin Wilck
2025-05-12 15:18 ` Kevin Wolf
2025-05-13 5:55 ` Christoph Hellwig
2025-05-13 6:09 ` Hannes Reinecke
2025-05-13 6:14 ` Christoph Hellwig
2025-05-13 6:32 ` Hannes Reinecke
2025-05-13 6:49 ` Christoph Hellwig
2025-05-13 8:17 ` Martin Wilck
2025-05-14 4:53 ` Christoph Hellwig
2025-05-15 11:14 ` Paolo Bonzini
2025-05-13 16:29 ` Benjamin Marzinski
2025-05-14 4:56 ` Christoph Hellwig
2025-05-14 6:39 ` Hannes Reinecke
2025-05-14 16:01 ` Benjamin Marzinski
2025-05-16 5:52 ` Christoph Hellwig
2025-05-13 9:29 ` Kevin Wolf
2025-05-13 15:43 ` Paolo Bonzini
2025-05-14 4:57 ` Christoph Hellwig
2025-05-14 16:23 ` Benjamin Marzinski
2025-05-14 17:37 ` Martin Wilck [this message]
2025-05-15 2:53 ` Paolo Bonzini
2025-05-15 10:34 ` Martin Wilck
2025-05-15 10:51 ` Paolo Bonzini
2025-05-15 14:50 ` Martin Wilck
2025-05-15 14:29 ` Benjamin Marzinski
2025-05-15 15:00 ` Martin Wilck
2025-05-16 5:57 ` Christoph Hellwig
2025-05-13 6:30 ` Hannes Reinecke
2025-05-13 18:09 ` Benjamin Marzinski
2025-05-13 8:00 ` Martin Wilck
2025-05-13 10:06 ` Martin Wilck
2025-05-14 21:21 ` Martin Wilck
2025-05-15 10:11 ` Kevin Wolf
2025-05-15 11:09 ` Paolo Bonzini
2025-05-15 15:18 ` Martin Wilck
2025-05-15 15:05 ` Martin Wilck
2025-05-16 6:00 ` Christoph Hellwig
2025-05-16 16:06 ` Benjamin Marzinski
2025-05-19 5:32 ` Christoph Hellwig
2025-05-19 18:24 ` Benjamin Marzinski
2025-05-28 20:44 ` Martin Wilck
2025-05-19 10:06 ` Kevin Wolf
2025-05-19 17:33 ` Martin Wilck
2025-05-20 13:46 ` Christoph Hellwig
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=50beb356b4dc000446fd186ab754c87f386eaeae.camel@suse.com \
--to=mwilck@suse.com \
--cc=bmarzins@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=hare@suse.com \
--cc=hch@infradead.org \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=pbonzini@redhat.com \
--cc=snitzer@kernel.org \
/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
Powered by JetHome