Blame SOURCES/0001-Revert-qemu-pr-helper-use-new-libmultipath-API.patch

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