linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] dm mpath: Interface for explicit probing of active paths
@ 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
                   ` (2 more replies)
  0 siblings, 3 replies; 52+ messages in thread
From: Kevin Wolf @ 2025-04-29 16:50 UTC (permalink / raw)
  To: dm-devel; +Cc: kwolf, hreitz, mpatocka, snitzer, bmarzins, linux-kernel

Multipath cannot directly provide failover for ioctls in the kernel
because it doesn't know what each ioctl means and which result could
indicate a path error. Userspace generally knows what the ioctl it
issued means and if it might be a path error, but neither does it know
which path the ioctl took nor does it necessarily have the privileges to
fail a path using the control device.

This series adds an interface that userspace can use to probe paths and
fail the bad ones after seeing a potential path error in an ioctl
result. Once the bad paths are eliminated, the ioctl can be retried.

While the fundamental problem is relatively broad and can affect any
sort of ioctl, the immediate motivation for this is the use of SG_IO in
QEMU for SCSI passthrough. A preliminary QEMU side patch that makes use
of the new interface to support multipath failover with SCSI passthrough
can be found at:

https://repo.or.cz/qemu/kevin.git/commitdiff/78a474da3b39469b11fbb1d4e0ddf4797b637d35

Kevin Wolf (2):
  dm: Allow .prepare_ioctl to handle ioctls directly
  dm mpath: Interface for explicit probing of active paths

 include/linux/device-mapper.h |  9 +++-
 include/uapi/linux/dm-ioctl.h |  9 +++-
 drivers/md/dm-dust.c          |  4 +-
 drivers/md/dm-ebs-target.c    |  3 +-
 drivers/md/dm-flakey.c        |  4 +-
 drivers/md/dm-ioctl.c         |  1 +
 drivers/md/dm-linear.c        |  4 +-
 drivers/md/dm-log-writes.c    |  4 +-
 drivers/md/dm-mpath.c         | 95 ++++++++++++++++++++++++++++++++++-
 drivers/md/dm-switch.c        |  4 +-
 drivers/md/dm-verity-target.c |  4 +-
 drivers/md/dm-zoned-target.c  |  3 +-
 drivers/md/dm.c               | 17 ++++---
 13 files changed, 142 insertions(+), 19 deletions(-)

-- 
2.49.0


^ permalink raw reply	[flat|nested] 52+ messages in thread

end of thread, other threads:[~2025-05-28 20:44 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).