aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2017-08-22 06:50:55 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2017-09-22 21:07:27 +0200
commitfe8fc5ae5c808e037fa4746cbfeb3c07ffe0af81 (patch)
tree973ce75621cb47f79167bde4e48bdc357ed58bde /configure
parentb855f8d175a0a26c9798cbc5962bb8c0d9538231 (diff)
downloadqemu-fe8fc5ae5c808e037fa4746cbfeb3c07ffe0af81.zip
qemu-fe8fc5ae5c808e037fa4746cbfeb3c07ffe0af81.tar.gz
qemu-fe8fc5ae5c808e037fa4746cbfeb3c07ffe0af81.tar.bz2
scsi: add multipath support to qemu-pr-helper
Proper support of persistent reservation for multipath devices requires communication with the multipath daemon, so that the reservation is registered and applied when a path comes up. The device mapper utilities provide a library to do so; this patch makes qemu-pr-helper.c detect multipath devices and, when one is found, delegate the operation to libmpathpersist. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure46
1 files changed, 46 insertions, 0 deletions
diff --git a/configure b/configure
index becc21a..f6edc2a 100755
--- a/configure
+++ b/configure
@@ -290,6 +290,7 @@ netmap="no"
sdl=""
sdlabi=""
virtfs=""
+mpath=""
vnc="yes"
sparse="no"
vde=""
@@ -936,6 +937,10 @@ for opt do
;;
--enable-virtfs) virtfs="yes"
;;
+ --disable-mpath) mpath="no"
+ ;;
+ --enable-mpath) mpath="yes"
+ ;;
--disable-vnc) vnc="no"
;;
--enable-vnc) vnc="yes"
@@ -1479,6 +1484,7 @@ disabled with --disable-FEATURE, default is enabled if available:
vnc-png PNG compression for VNC server
cocoa Cocoa UI (Mac OS X only)
virtfs VirtFS
+ mpath Multipath persistent reservation passthrough
xen xen backend driver support
xen-pci-passthrough
brlapi BrlAPI (Braile)
@@ -3300,6 +3306,30 @@ else
fi
##########################################
+# libmpathpersist probe
+
+if test "$mpath" != "no" ; then
+ cat > $TMPC <<EOF
+#include <libudev.h>
+#include <mpath_persist.h>
+unsigned mpath_mx_alloc_len = 1024;
+int logsink;
+int main(void) {
+ struct udev *udev = udev_new();
+ mpath_lib_init(udev);
+ return 0;
+}
+EOF
+ if compile_prog "" "-ludev -lmultipath -lmpathpersist" ; then
+ mpathpersist=yes
+ else
+ mpathpersist=no
+ fi
+else
+ mpathpersist=no
+fi
+
+##########################################
# libcap probe
if test "$cap" != "no" ; then
@@ -5044,12 +5074,24 @@ if test "$softmmu" = yes ; then
fi
virtfs=no
fi
+ if test "$mpath" != no && test "$mpathpersist" = yes ; then
+ mpath=yes
+ else
+ if test "$mpath" = yes; then
+ error_exit "Multipath requires libmpathpersist devel"
+ fi
+ mpath=no
+ fi
tools="$tools scsi/qemu-pr-helper\$(EXESUF)"
else
if test "$virtfs" = yes; then
error_exit "VirtFS is supported only on Linux"
fi
virtfs=no
+ if test "$mpath" = yes; then
+ error_exit "Multipath is supported only on Linux"
+ fi
+ mpath=no
fi
fi
@@ -5295,6 +5337,7 @@ echo "Audio drivers $audio_drv_list"
echo "Block whitelist (rw) $block_drv_rw_whitelist"
echo "Block whitelist (ro) $block_drv_ro_whitelist"
echo "VirtFS support $virtfs"
+echo "Multipath support $mpath"
echo "VNC support $vnc"
if test "$vnc" = "yes" ; then
echo "VNC SASL support $vnc_sasl"
@@ -5738,6 +5781,9 @@ fi
if test "$virtfs" = "yes" ; then
echo "CONFIG_VIRTFS=y" >> $config_host_mak
fi
+if test "$mpath" = "yes" ; then
+ echo "CONFIG_MPATH=y" >> $config_host_mak
+fi
if test "$vhost_scsi" = "yes" ; then
echo "CONFIG_VHOST_SCSI=y" >> $config_host_mak
fi