Skip to content

Commit 1f119c7

Browse files
author
CKI KWF Bot
committed
Merge: dm: Add interface for probing active paths of a multipath device
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1004 JIRA: https://issues.redhat.com/browse/RHEL-89481 Tested: Verified feature works as intended. Upstream Status: kernel/git/torvalds/linux.git In order to enable QEMU to handle path failures with scsi passthrough using SG_IO ioctls on top of multipath devices, dm multipath now provides an interface to check the active paths and fail the one that are not working. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Approved-by: Hanna Czenczek <hreitz@redhat.com> Approved-by: Kevin Wolf <kwolf@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 5c14386 + 7c2ada4 commit 1f119c7

File tree

13 files changed

+233
-76
lines changed

13 files changed

+233
-76
lines changed

drivers/md/dm-dust.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,9 @@ static void dust_status(struct dm_target *ti, status_type_t type,
534534
}
535535
}
536536

537-
static int dust_prepare_ioctl(struct dm_target *ti, struct block_device **bdev)
537+
static int dust_prepare_ioctl(struct dm_target *ti, struct block_device **bdev,
538+
unsigned int cmd, unsigned long arg,
539+
bool *forward)
538540
{
539541
struct dust_device *dd = ti->private;
540542
struct dm_dev *dev = dd->dev;

drivers/md/dm-ebs-target.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,8 @@ static void ebs_status(struct dm_target *ti, status_type_t type,
415415
}
416416
}
417417

418-
static int ebs_prepare_ioctl(struct dm_target *ti, struct block_device **bdev)
418+
static int ebs_prepare_ioctl(struct dm_target *ti, struct block_device **bdev,
419+
unsigned int cmd, unsigned long arg, bool *forward)
419420
{
420421
struct ebs_c *ec = ti->private;
421422
struct dm_dev *dev = ec->dev;

drivers/md/dm-flakey.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,9 @@ static void flakey_status(struct dm_target *ti, status_type_t type,
638638
}
639639
}
640640

641-
static int flakey_prepare_ioctl(struct dm_target *ti, struct block_device **bdev)
641+
static int flakey_prepare_ioctl(struct dm_target *ti, struct block_device **bdev,
642+
unsigned int cmd, unsigned long arg,
643+
bool *forward)
642644
{
643645
struct flakey_c *fc = ti->private;
644646

drivers/md/dm-ioctl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1885,6 +1885,7 @@ static ioctl_fn lookup_ioctl(unsigned int cmd, int *ioctl_flags)
18851885
{DM_DEV_SET_GEOMETRY_CMD, 0, dev_set_geometry},
18861886
{DM_DEV_ARM_POLL_CMD, IOCTL_FLAGS_NO_PARAMS, dev_arm_poll},
18871887
{DM_GET_TARGET_VERSION_CMD, 0, get_target_version},
1888+
{DM_MPATH_PROBE_PATHS_CMD, 0, NULL}, /* block device ioctl */
18881889
};
18891890

18901891
if (unlikely(cmd >= ARRAY_SIZE(_ioctls)))

drivers/md/dm-linear.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ static void linear_status(struct dm_target *ti, status_type_t type,
119119
}
120120
}
121121

122-
static int linear_prepare_ioctl(struct dm_target *ti, struct block_device **bdev)
122+
static int linear_prepare_ioctl(struct dm_target *ti, struct block_device **bdev,
123+
unsigned int cmd, unsigned long arg,
124+
bool *forward)
123125
{
124126
struct linear_c *lc = ti->private;
125127
struct dm_dev *dev = lc->dev;

drivers/md/dm-log-writes.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,9 @@ static void log_writes_status(struct dm_target *ti, status_type_t type,
818818
}
819819

820820
static int log_writes_prepare_ioctl(struct dm_target *ti,
821-
struct block_device **bdev)
821+
struct block_device **bdev,
822+
unsigned int cmd, unsigned long arg,
823+
bool *forward)
822824
{
823825
struct log_writes_c *lc = ti->private;
824826
struct dm_dev *dev = lc->dev;

0 commit comments

Comments
 (0)