|
|
1bdc94 |
From 1bd23e669764623512441f335b3a09b46265a9fa Mon Sep 17 00:00:00 2001
|
|
|
1bdc94 |
From: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
1bdc94 |
Date: Tue, 5 Dec 2017 17:28:56 +0100
|
|
|
1bdc94 |
Subject: Revert "qemu-pr-helper: use new libmultipath API"
|
|
|
1bdc94 |
|
|
|
1bdc94 |
This reverts commit b3f1c8c413bc83e4a2cc7a63e4eddf9fe6449052.
|
|
|
1bdc94 |
|
|
|
1bdc94 |
We have to revert this change in RHEL 7 as new libmultipath API is
|
|
|
1bdc94 |
not available.
|
|
|
1bdc94 |
---
|
|
|
1bdc94 |
configure | 12 ++----------
|
|
|
1bdc94 |
scsi/qemu-pr-helper.c | 17 +++--------------
|
|
|
1bdc94 |
2 files changed, 5 insertions(+), 24 deletions(-)
|
|
|
1bdc94 |
|
|
|
1bdc94 |
diff --git a/configure b/configure
|
|
|
1bdc94 |
index 0a19b03..e9243f5 100755
|
|
|
1bdc94 |
--- a/configure
|
|
|
1bdc94 |
+++ b/configure
|
|
|
1bdc94 |
@@ -3472,17 +3472,9 @@ if test "$mpath" != "no" ; then
|
|
|
1bdc94 |
#include <mpath_persist.h>
|
|
|
1bdc94 |
unsigned mpath_mx_alloc_len = 1024;
|
|
|
1bdc94 |
int logsink;
|
|
|
1bdc94 |
-static struct config *multipath_conf;
|
|
|
1bdc94 |
-extern struct udev *udev;
|
|
|
1bdc94 |
-extern struct config *get_multipath_config(void);
|
|
|
1bdc94 |
-extern void put_multipath_config(struct config *conf);
|
|
|
1bdc94 |
-struct udev *udev;
|
|
|
1bdc94 |
-struct config *get_multipath_config(void) { return multipath_conf; }
|
|
|
1bdc94 |
-void put_multipath_config(struct config *conf) { }
|
|
|
1bdc94 |
-
|
|
|
1bdc94 |
int main(void) {
|
|
|
1bdc94 |
- udev = udev_new();
|
|
|
1bdc94 |
- multipath_conf = mpath_lib_init();
|
|
|
1bdc94 |
+ struct udev *udev = udev_new();
|
|
|
1bdc94 |
+ mpath_lib_init(udev);
|
|
|
1bdc94 |
return 0;
|
|
|
1bdc94 |
}
|
|
|
1bdc94 |
EOF
|
|
|
1bdc94 |
diff --git a/scsi/qemu-pr-helper.c b/scsi/qemu-pr-helper.c
|
|
|
1bdc94 |
index d0f8317..7a29e64 100644
|
|
|
1bdc94 |
--- a/scsi/qemu-pr-helper.c
|
|
|
1bdc94 |
+++ b/scsi/qemu-pr-helper.c
|
|
|
1bdc94 |
@@ -276,26 +276,15 @@ static void dm_init(void)
|
|
|
1bdc94 |
|
|
|
1bdc94 |
/* Variables required by libmultipath and libmpathpersist. */
|
|
|
1bdc94 |
QEMU_BUILD_BUG_ON(PR_HELPER_DATA_SIZE > MPATH_MAX_PARAM_LEN);
|
|
|
1bdc94 |
-static struct config *multipath_conf;
|
|
|
1bdc94 |
unsigned mpath_mx_alloc_len = PR_HELPER_DATA_SIZE;
|
|
|
1bdc94 |
int logsink;
|
|
|
1bdc94 |
-struct udev *udev;
|
|
|
1bdc94 |
-
|
|
|
1bdc94 |
-extern struct config *get_multipath_config(void);
|
|
|
1bdc94 |
-struct config *get_multipath_config(void)
|
|
|
1bdc94 |
-{
|
|
|
1bdc94 |
- return multipath_conf;
|
|
|
1bdc94 |
-}
|
|
|
1bdc94 |
-
|
|
|
1bdc94 |
-extern void put_multipath_config(struct config *conf);
|
|
|
1bdc94 |
-void put_multipath_config(struct config *conf)
|
|
|
1bdc94 |
-{
|
|
|
1bdc94 |
-}
|
|
|
1bdc94 |
|
|
|
1bdc94 |
static void multipath_pr_init(void)
|
|
|
1bdc94 |
{
|
|
|
1bdc94 |
+ static struct udev *udev;
|
|
|
1bdc94 |
+
|
|
|
1bdc94 |
udev = udev_new();
|
|
|
1bdc94 |
- multipath_conf = mpath_lib_init();
|
|
|
1bdc94 |
+ mpath_lib_init(udev);
|
|
|
1bdc94 |
}
|
|
|
1bdc94 |
|
|
|
1bdc94 |
static int is_mpath(int fd)
|
|
|
1bdc94 |
--
|
|
|
1bdc94 |
1.8.3.1
|
|
|
1bdc94 |
|