Skip to content

dm mpath: Interface for explicit probing of active paths

Kevin Wolf dm-devel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 49 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2dm: Allow .prepare_ioctl to handle ioctls directlydrivers/md/dm-dust.c drivers/md/dm-ebs-target.c drivers/md/dm-flakey.c +8 more+44 -162 replies
2/2dm mpath: Interface for explicit probing of active pathsdrivers/md/dm-ioctl.c drivers/md/dm-mpath.c include/uapi/linux/dm-ioctl.h+98 -31 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchBenjamin Marzinski
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] dm mpath: Interface for explicit probing of active paths

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(-)
Signature · 1 line
2.49.0