|
|
9ae3a8 |
From 018133d4217c5aebaa09a43b341b0765075f4254 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
Date: Fri, 7 Nov 2014 17:17:55 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 08/41] dump: add support for lzo/snappy
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Message-id: <1415380693-16593-9-git-send-email-lersek@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 62194
|
|
|
9ae3a8 |
O-Subject: [RHEL-7.1 qemu-kvm PATCH 08/26] dump: add support for lzo/snappy
|
|
|
9ae3a8 |
Bugzilla: 1157798
|
|
|
9ae3a8 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: dgibson <dgibson@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
From: qiaonuohan <qiaonuohan@cn.fujitsu.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
kdump-compressed format supports three compression format, zlib/lzo/snappy.
|
|
|
9ae3a8 |
Currently, only zlib is available. This patch is used to support lzo/snappy.
|
|
|
9ae3a8 |
'--enable-lzo/--enable-snappy' is needed to be specified with configure to make
|
|
|
9ae3a8 |
lzo/snappy available for qemu
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
|
|
|
9ae3a8 |
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit 607dacd0a082a4ea73a7a16a1c70406f37ebacdb)
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Conflicts:
|
|
|
9ae3a8 |
configure
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
configure | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
9ae3a8 |
1 file changed, 54 insertions(+)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/configure b/configure
|
|
|
9ae3a8 |
index fb0c839..5373237 100755
|
|
|
9ae3a8 |
--- a/configure
|
|
|
9ae3a8 |
+++ b/configure
|
|
|
9ae3a8 |
@@ -232,6 +232,8 @@ libusb=""
|
|
|
9ae3a8 |
usb_redir=""
|
|
|
9ae3a8 |
glx=""
|
|
|
9ae3a8 |
zlib="yes"
|
|
|
9ae3a8 |
+lzo="no"
|
|
|
9ae3a8 |
+snappy="no"
|
|
|
9ae3a8 |
guest_agent="yes"
|
|
|
9ae3a8 |
want_tools="yes"
|
|
|
9ae3a8 |
libiscsi=""
|
|
|
9ae3a8 |
@@ -909,6 +911,10 @@ for opt do
|
|
|
9ae3a8 |
;;
|
|
|
9ae3a8 |
--disable-zlib-test) zlib="no"
|
|
|
9ae3a8 |
;;
|
|
|
9ae3a8 |
+ --enable-lzo) lzo="yes"
|
|
|
9ae3a8 |
+ ;;
|
|
|
9ae3a8 |
+ --enable-snappy) snappy="yes"
|
|
|
9ae3a8 |
+ ;;
|
|
|
9ae3a8 |
--enable-guest-agent) guest_agent="yes"
|
|
|
9ae3a8 |
;;
|
|
|
9ae3a8 |
--disable-guest-agent) guest_agent="no"
|
|
|
9ae3a8 |
@@ -1220,6 +1226,8 @@ echo " --disable-libusb disable libusb (for usb passthrough)"
|
|
|
9ae3a8 |
echo " --enable-libusb enable libusb (for usb passthrough)"
|
|
|
9ae3a8 |
echo " --disable-usb-redir disable usb network redirection support"
|
|
|
9ae3a8 |
echo " --enable-usb-redir enable usb network redirection support"
|
|
|
9ae3a8 |
+echo " --enable-lzo enable the support of lzo compression library"
|
|
|
9ae3a8 |
+echo " --enable-snappy enable the support of snappy compression library"
|
|
|
9ae3a8 |
echo " --disable-guest-agent disable building of the QEMU Guest Agent"
|
|
|
9ae3a8 |
echo " --enable-guest-agent enable building of the QEMU Guest Agent"
|
|
|
9ae3a8 |
echo " --disable-seccomp disable seccomp support"
|
|
|
9ae3a8 |
@@ -1554,6 +1562,42 @@ fi
|
|
|
9ae3a8 |
libs_softmmu="$libs_softmmu -lz"
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
##########################################
|
|
|
9ae3a8 |
+# lzo check
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+if test "$lzo" != "no" ; then
|
|
|
9ae3a8 |
+ cat > $TMPC << EOF
|
|
|
9ae3a8 |
+#include <lzo/lzo1x.h>
|
|
|
9ae3a8 |
+int main(void) { lzo_version(); return 0; }
|
|
|
9ae3a8 |
+EOF
|
|
|
9ae3a8 |
+ if compile_prog "" "-llzo2" ; then
|
|
|
9ae3a8 |
+ :
|
|
|
9ae3a8 |
+ else
|
|
|
9ae3a8 |
+ error_exit "lzo check failed" \
|
|
|
9ae3a8 |
+ "Make sure to have the lzo libs and headers installed."
|
|
|
9ae3a8 |
+ fi
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+ libs_softmmu="$libs_softmmu -llzo2"
|
|
|
9ae3a8 |
+fi
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+##########################################
|
|
|
9ae3a8 |
+# snappy check
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+if test "$snappy" != "no" ; then
|
|
|
9ae3a8 |
+ cat > $TMPC << EOF
|
|
|
9ae3a8 |
+#include <snappy-c.h>
|
|
|
9ae3a8 |
+int main(void) { snappy_max_compressed_length(4096); return 0; }
|
|
|
9ae3a8 |
+EOF
|
|
|
9ae3a8 |
+ if compile_prog "" "-lsnappy" ; then
|
|
|
9ae3a8 |
+ :
|
|
|
9ae3a8 |
+ else
|
|
|
9ae3a8 |
+ error_exit "snappy check failed" \
|
|
|
9ae3a8 |
+ "Make sure to have the snappy libs and headers installed."
|
|
|
9ae3a8 |
+ fi
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+ libs_softmmu="$libs_softmmu -lsnappy"
|
|
|
9ae3a8 |
+fi
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+##########################################
|
|
|
9ae3a8 |
# libseccomp check
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
if test "$seccomp" != "no" ; then
|
|
|
9ae3a8 |
@@ -3648,6 +3692,8 @@ echo "QOM debugging $qom_cast_debug"
|
|
|
9ae3a8 |
echo "Live block operations $live_block_ops"
|
|
|
9ae3a8 |
echo "Live block migration $live_block_migration"
|
|
|
9ae3a8 |
echo "vhdx $vhdx"
|
|
|
9ae3a8 |
+echo "lzo support $lzo"
|
|
|
9ae3a8 |
+echo "snappy support $snappy"
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
if test "$sdl_too_old" = "yes"; then
|
|
|
9ae3a8 |
echo "-> Your SDL version is too old - please upgrade to have SDL support"
|
|
|
9ae3a8 |
@@ -3965,6 +4011,14 @@ if test "$glx" = "yes" ; then
|
|
|
9ae3a8 |
echo "GLX_LIBS=$glx_libs" >> $config_host_mak
|
|
|
9ae3a8 |
fi
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
+if test "$lzo" = "yes" ; then
|
|
|
9ae3a8 |
+ echo "CONFIG_LZO=y" >> $config_host_mak
|
|
|
9ae3a8 |
+fi
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+if test "$snappy" = "yes" ; then
|
|
|
9ae3a8 |
+ echo "CONFIG_SNAPPY=y" >> $config_host_mak
|
|
|
9ae3a8 |
+fi
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
if test "$libiscsi" = "yes" ; then
|
|
|
9ae3a8 |
echo "CONFIG_LIBISCSI=y" >> $config_host_mak
|
|
|
9ae3a8 |
echo "LIBISCSI_CFLAGS=$libiscsi_cflags" >> $config_host_mak
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.8.3.1
|
|
|
9ae3a8 |
|