From: Benjamin Marzinski <bmarzins@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: Christoph Hellwig <hch@infradead.org>,
Kevin Wolf <kwolf@redhat.com>, Martin Wilck <mwilck@suse.com>,
dm-devel@lists.linux.dev, hreitz@redhat.com, mpatocka@redhat.com,
snitzer@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] dm mpath: Interface for explicit probing of active paths
Date: Wed, 14 May 2025 12:01:37 -0400 [thread overview]
Message-ID: <aCS-YRWMT596l4Tq@redhat.com> (raw)
In-Reply-To: <37bb9993-baaa-4dc8-b5d4-e66201e4a462@suse.de>
On Wed, May 14, 2025 at 08:39:25AM +0200, Hannes Reinecke wrote:
> On 5/13/25 18:29, Benjamin Marzinski wrote:
> > On Mon, May 12, 2025 at 11:49:19PM -0700, Christoph Hellwig wrote:
> > > On Tue, May 13, 2025 at 08:32:12AM +0200, Hannes Reinecke wrote:
> > > > Reservations and stuff.
> > >
> > > They should use the kernel persistent reservation API.
> >
> > Currently QEMU isn't sending Persistent Reservation requests to
> > multipath devices at all. It's sending those directly to the underlying
> > scsi devices. The issue here is with all the other SCSI commands that
> > users want to send to their SCSI passthrough device that is actually a
> > multipath device on top of a number of SCSI paths. They expect to
> > get back the actual sense and status information, so QEMU needs to
> > send them via SG_IOs.
> >
> > Without reading that sense and status information in kernel, the
> > multipath target can't know if it needs to fail a path and retry the
> > ioctl down a different path. QEMU can read this information, but it
> > doesn't know what path the multipath device send the ioctl down. This
> > patch just gives users a way to check the paths in the active pathgroup
> > (which all should be able to handle IO) and fail those that can't.
> > While QEMU is the driver of this, it's completely general functionality.
> >
> Ouch.
> Different reservations on different paths? Really?
> How do you manage to keep the reservations up-to-date?
multipath's libmpathpersist library. You contributed some code to it
IIRC. It predates the kernel interface, and even if we switched to using
the kernel interface to send persistent reservation commands to the
paths instead of doing that in userspace (the dm_pr_ops functions would
needs some reworking to handle multipath, where the rules are different
than for other dm-devices. For instance, you only want to reserve on one
path, and it's not necessarily a failure if you can't register a key
down all paths) we would still probably want to use the library, since
it also coordinates with multipathd so that it can register keys on
paths that are later added to the multipath device or were down when the
registration initially happened.
> My recommendation is to use the _same_ reservation on all paths,
> precisely to avoid having to re-do reservations on path failure.
> And for that scenario the kernel persistent reservation API
> would work fine.
Libmpathpersist does register the same key for all paths of a multipath
device. Doing anything else would be crazy. Sorry if my last email was
misleading. But the kernel API cannot help in the case where a path is
later added to the multipath device, or was down when the initial
registration happened.
But again, all this is orthogonal to the patches in question, which have
nothing to do with Persistent Reservations.
-Ben
> Cheers,
>
> Hannes
> --
> Dr. Hannes Reinecke Kernel Storage Architect
> hare@suse.de +49 911 74053 688
> SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
> HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
next prev parent reply other threads:[~2025-05-14 16:01 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 16:50 [PATCH 0/2] dm mpath: Interface for explicit probing of active paths 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 [this message]
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
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=aCS-YRWMT596l4Tq@redhat.com \
--to=bmarzins@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=hare@suse.de \
--cc=hch@infradead.org \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=mwilck@suse.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;
as well as URLs for NNTP newsgroup(s).