qemu-kvm/kvm-file-posix-Define-DM_MPATH_PROBE_PATHS.patch
Jon Maloy fe09579d2f * Mon Jun 09 2025 Jon Maloy <jmaloy@redhat.com> - 9.1.0-23
- kvm-net-vhost-user-add-QAPI-events-to-report-connection-.patch [RHEL-95120]
- kvm-file-posix-Define-DM_MPATH_PROBE_PATHS.patch [RHEL-95408]
- kvm-file-posix-Probe-paths-and-retry-SG_IO-on-potential-.patch [RHEL-95408]
- Resolves: RHEL-95120
  (Allow libvirt to restart passt/vhost-user when the process is killed [rhel-9.7])
- Resolves: RHEL-95408
  (Support multipath failover with scsi-block [rhel-9])
2025-06-09 17:42:49 -04:00

43 lines
1.4 KiB
Diff

From d565fe385b3c45a41fa8e25942220aff38a04fc3 Mon Sep 17 00:00:00 2001
From: Kevin Wolf <kwolf@redhat.com>
Date: Tue, 29 Apr 2025 17:05:41 +0200
Subject: [PATCH 2/3] file-posix: Define DM_MPATH_PROBE_PATHS
RH-Author: Kevin Wolf <kwolf@redhat.com>
RH-MergeRequest: 372: file-posix: Fix multipath failover with SCSI passthrough [9.7]
RH-Jira: RHEL-95408
RH-Acked-by: Hanna Czenczek <hreitz@redhat.com>
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
RH-Commit: [1/2] 7615906833a6bb2b4645fa5cd60d78aa9631cb7c (kmwolf/centos-qemu-kvm)
While the kernel side isn't merged yet and we're still using old kernel
headers, just define DM_MPATH_PROBE_PATHS manually.
This is a downstream-only patch that can be removed after the next minor
release.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/file-posix.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/block/file-posix.c b/block/file-posix.c
index 0cb4e922c0..6a5c506549 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -134,6 +134,11 @@
#define RAW_LOCK_PERM_BASE 100
#define RAW_LOCK_SHARED_BASE 200
+/* TODO Remove this when the kernel side is merged */
+#if !defined(DM_MPATH_PROBE_PATHS) && defined(DM_GET_TARGET_VERSION)
+#define DM_MPATH_PROBE_PATHS _IO(DM_IOCTL, DM_GET_TARGET_VERSION_CMD + 1)
+#endif
+
typedef struct BDRVRawState {
int fd;
bool use_lock;
--
2.48.1