fix multipath qemu-pr-helper
Update patch 1014 for new libmultipath/libmpathpersist API Force build to fail if multipath is not available
This commit is contained in:
parent
66554ce0d3
commit
bb046c0072
@ -65,7 +65,7 @@ index becc21a0fe..f6edc2a33f 100755
|
|||||||
xen xen backend driver support
|
xen xen backend driver support
|
||||||
xen-pci-passthrough
|
xen-pci-passthrough
|
||||||
brlapi BrlAPI (Braile)
|
brlapi BrlAPI (Braile)
|
||||||
@@ -3300,6 +3306,30 @@ else
|
@@ -3300,6 +3306,38 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
@ -77,9 +77,17 @@ index becc21a0fe..f6edc2a33f 100755
|
|||||||
+#include <mpath_persist.h>
|
+#include <mpath_persist.h>
|
||||||
+unsigned mpath_mx_alloc_len = 1024;
|
+unsigned mpath_mx_alloc_len = 1024;
|
||||||
+int logsink;
|
+int logsink;
|
||||||
|
+static struct config *multipath_conf;
|
||||||
|
+extern struct udev *udev;
|
||||||
|
+extern struct config *get_multipath_config(void);
|
||||||
|
+extern void put_multipath_config(struct config *conf);
|
||||||
|
+struct udev *udev;
|
||||||
|
+struct config *get_multipath_config(void) { return multipath_conf; }
|
||||||
|
+void put_multipath_config(struct config *conf) { }
|
||||||
|
+
|
||||||
+int main(void) {
|
+int main(void) {
|
||||||
+ struct udev *udev = udev_new();
|
+ udev = udev_new();
|
||||||
+ mpath_lib_init(udev);
|
+ multipath_conf = mpath_lib_init();
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
+EOF
|
+EOF
|
||||||
@ -225,7 +233,7 @@ index e39efbd529..5f77c873e1 100644
|
|||||||
static int verbose;
|
static int verbose;
|
||||||
|
|
||||||
#ifdef CONFIG_LIBCAP
|
#ifdef CONFIG_LIBCAP
|
||||||
@@ -204,9 +211,316 @@ static int do_sgio(int fd, const uint8_t *cdb, uint8_t *sense,
|
@@ -204,9 +211,327 @@ static int do_sgio(int fd, const uint8_t *cdb, uint8_t *sense,
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -294,15 +302,26 @@ index e39efbd529..5f77c873e1 100644
|
|||||||
+
|
+
|
||||||
+/* Variables required by libmultipath and libmpathpersist. */
|
+/* Variables required by libmultipath and libmpathpersist. */
|
||||||
+QEMU_BUILD_BUG_ON(PR_HELPER_DATA_SIZE > MPATH_MAX_PARAM_LEN);
|
+QEMU_BUILD_BUG_ON(PR_HELPER_DATA_SIZE > MPATH_MAX_PARAM_LEN);
|
||||||
|
+static struct config *multipath_conf;
|
||||||
+unsigned mpath_mx_alloc_len = PR_HELPER_DATA_SIZE;
|
+unsigned mpath_mx_alloc_len = PR_HELPER_DATA_SIZE;
|
||||||
+int logsink;
|
+int logsink;
|
||||||
|
+struct udev *udev;
|
||||||
|
+
|
||||||
|
+extern struct config *get_multipath_config(void);
|
||||||
|
+struct config *get_multipath_config(void)
|
||||||
|
+{
|
||||||
|
+ return multipath_conf;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+extern void put_multipath_config(struct config *conf);
|
||||||
|
+void put_multipath_config(struct config *conf)
|
||||||
|
+{
|
||||||
|
+}
|
||||||
+
|
+
|
||||||
+static void multipath_pr_init(void)
|
+static void multipath_pr_init(void)
|
||||||
+{
|
+{
|
||||||
+ static struct udev *udev;
|
|
||||||
+
|
|
||||||
+ udev = udev_new();
|
+ udev = udev_new();
|
||||||
+ mpath_lib_init(udev);
|
+ multipath_conf = mpath_lib_init();
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+static int is_mpath(int fd)
|
+static int is_mpath(int fd)
|
||||||
|
@ -3,6 +3,7 @@ Description=Persistent Reservation Daemon for QEMU
|
|||||||
|
|
||||||
[Socket]
|
[Socket]
|
||||||
ListenStream=/run/qemu-pr-helper.sock
|
ListenStream=/run/qemu-pr-helper.sock
|
||||||
|
SocketMode=0600
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -107,7 +107,7 @@ Requires: %{name}-block-ssh = %{epoch}:%{version}-%{release}
|
|||||||
Summary: QEMU is a FAST! processor emulator
|
Summary: QEMU is a FAST! processor emulator
|
||||||
Name: qemu
|
Name: qemu
|
||||||
Version: 2.10.0
|
Version: 2.10.0
|
||||||
Release: 4%{?rcrel}%{?dist}
|
Release: 5%{?rcrel}%{?dist}
|
||||||
Epoch: 2
|
Epoch: 2
|
||||||
License: GPLv2+ and LGPLv2+ and BSD
|
License: GPLv2+ and LGPLv2+ and BSD
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
@ -1133,6 +1133,7 @@ run_configure \
|
|||||||
--enable-modules \
|
--enable-modules \
|
||||||
--audio-drv-list=pa,sdl,alsa,oss \
|
--audio-drv-list=pa,sdl,alsa,oss \
|
||||||
--tls-priority=@QEMU,SYSTEM \
|
--tls-priority=@QEMU,SYSTEM \
|
||||||
|
--enable-mpath \
|
||||||
%{spiceflag} \
|
%{spiceflag} \
|
||||||
--with-sdlabi="2.0" \
|
--with-sdlabi="2.0" \
|
||||||
--with-gtkabi="3.0"
|
--with-gtkabi="3.0"
|
||||||
@ -1173,6 +1174,7 @@ run_configure \
|
|||||||
--disable-nettle \
|
--disable-nettle \
|
||||||
--disable-cap-ng \
|
--disable-cap-ng \
|
||||||
--disable-brlapi \
|
--disable-brlapi \
|
||||||
|
--disable-mpath \
|
||||||
--disable-libnfs
|
--disable-libnfs
|
||||||
|
|
||||||
make V=1 %{?_smp_mflags} $buildldflags
|
make V=1 %{?_smp_mflags} $buildldflags
|
||||||
@ -2016,6 +2018,11 @@ getent passwd qemu >/dev/null || \
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Oct 17 2017 Paolo Bonzini <pbonzini@redhat.com> - 2:2.10.0-5
|
||||||
|
- Update patch 1014 for new libmultipath/libmpathpersist API
|
||||||
|
- Force build to fail if multipath is not available
|
||||||
|
- Tighten permissions on the qemu-pr-helper socket
|
||||||
|
|
||||||
* Thu Sep 28 2017 Paolo Bonzini <pbonzini@redhat.com> - 2:2.10.0-4
|
* Thu Sep 28 2017 Paolo Bonzini <pbonzini@redhat.com> - 2:2.10.0-4
|
||||||
- Stop using tcmalloc, glibc got faster
|
- Stop using tcmalloc, glibc got faster
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user