yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-block-Make-more-block-drivers-compile-time-configura.patch

26ba25
From 274453614da9cb63ec8be5d0525c8b709fc51333 Mon Sep 17 00:00:00 2001
26ba25
From: Jeff Cody <jcody@redhat.com>
26ba25
Date: Tue, 13 Nov 2018 15:26:09 +0000
26ba25
Subject: [PATCH 1/2] block: Make more block drivers compile-time configurable
26ba25
MIME-Version: 1.0
26ba25
Content-Type: text/plain; charset=UTF-8
26ba25
Content-Transfer-Encoding: 8bit
26ba25
26ba25
RH-Author: Markus Armbruster <armbru@redhat.com>
26ba25
Message-id: <20181113162610.30902-2-armbru@redhat.com>
26ba25
Patchwork-id: 83001
26ba25
O-Subject: [qemu-kvm RHEL8/virt212 PATCH v3 1/2] block: Make more block drivers compile-time configurable
26ba25
Bugzilla: 1598842 1598842
26ba25
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
26ba25
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
26ba25
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
26ba25
RH-Acked-by: Danilo de Paula <ddepaula@redhat.com>
26ba25
26ba25
From: Jeff Cody <jcody@redhat.com>
26ba25
This adds configure options to control the following block drivers:
26ba25
26ba25
* Bochs
26ba25
* Cloop
26ba25
* Dmg
26ba25
* Qcow (V1)
26ba25
* Vdi
26ba25
* Vvfat
26ba25
* qed
26ba25
* parallels
26ba25
* sheepdog
26ba25
26ba25
Each of these defaults to being enabled.
26ba25
26ba25
Signed-off-by: Jeff Cody <jcody@redhat.com>
26ba25
Signed-off-by: Markus Armbruster <armbru@redhat.com>
26ba25
Message-id: 20181107063644.2254-1-armbru@redhat.com
26ba25
Signed-off-by: Max Reitz <mreitz@redhat.com>
26ba25
(cherry picked from commit 2f74013655e562cb97271e2ed75144ea15f0d670)
26ba25
26ba25
Straightforward conflict due to lack of commit bfcc224e3cf "block: Add
26ba25
blklogwrites".
26ba25
26ba25
Signed-off-by: Markus Armbruster <armbru@redhat.com>
26ba25
Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
26ba25
---
26ba25
 block/Makefile.objs | 22 +++++++++----
26ba25
 configure           | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++
26ba25
 2 files changed, 107 insertions(+), 6 deletions(-)
26ba25
26ba25
diff --git a/block/Makefile.objs b/block/Makefile.objs
26ba25
index be2cda1..037c76b 100644
26ba25
--- a/block/Makefile.objs
26ba25
+++ b/block/Makefile.objs
26ba25
@@ -1,10 +1,18 @@
26ba25
-block-obj-y += raw-format.o qcow.o vdi.o vmdk.o cloop.o bochs.o vpc.o vvfat.o dmg.o
26ba25
+block-obj-y += raw-format.o vmdk.o vpc.o
26ba25
+block-obj-$(CONFIG_QCOW1) += qcow.o
26ba25
+block-obj-$(CONFIG_VDI) += vdi.o
26ba25
+block-obj-$(CONFIG_CLOOP) += cloop.o
26ba25
+block-obj-$(CONFIG_BOCHS) += bochs.o
26ba25
+block-obj-$(CONFIG_VVFAT) += vvfat.o
26ba25
+block-obj-$(CONFIG_DMG) += dmg.o
26ba25
+
26ba25
 block-obj-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o qcow2-cache.o qcow2-bitmap.o
26ba25
-block-obj-y += qed.o qed-l2-cache.o qed-table.o qed-cluster.o
26ba25
-block-obj-y += qed-check.o
26ba25
+block-obj-$(CONFIG_QED) += qed.o qed-l2-cache.o qed-table.o qed-cluster.o
26ba25
+block-obj-$(CONFIG_QED) += qed-check.o
26ba25
 block-obj-y += vhdx.o vhdx-endian.o vhdx-log.o
26ba25
 block-obj-y += quorum.o
26ba25
-block-obj-y += parallels.o blkdebug.o blkverify.o blkreplay.o
26ba25
+block-obj-y += blkdebug.o blkverify.o blkreplay.o
26ba25
+block-obj-$(CONFIG_PARALLELS) += parallels.o
26ba25
 block-obj-y += block-backend.o snapshot.o qapi.o
26ba25
 block-obj-$(CONFIG_WIN32) += file-win32.o win32-aio.o
26ba25
 block-obj-$(CONFIG_POSIX) += file-posix.o
26ba25
@@ -13,7 +21,8 @@ block-obj-y += null.o mirror.o commit.o io.o create.o
26ba25
 block-obj-y += throttle-groups.o
26ba25
 block-obj-$(CONFIG_LINUX) += nvme.o
26ba25
 
26ba25
-block-obj-y += nbd.o nbd-client.o sheepdog.o
26ba25
+block-obj-y += nbd.o nbd-client.o
26ba25
+block-obj-$(CONFIG_SHEEPDOG) += sheepdog.o
26ba25
 block-obj-$(CONFIG_LIBISCSI) += iscsi.o
26ba25
 block-obj-$(if $(CONFIG_LIBISCSI),y,n) += iscsi-opts.o
26ba25
 block-obj-$(CONFIG_LIBNFS) += nfs.o
26ba25
@@ -44,7 +53,8 @@ gluster.o-libs     := $(GLUSTERFS_LIBS)
26ba25
 vxhs.o-libs        := $(VXHS_LIBS)
26ba25
 ssh.o-cflags       := $(LIBSSH2_CFLAGS)
26ba25
 ssh.o-libs         := $(LIBSSH2_LIBS)
26ba25
-block-obj-$(if $(CONFIG_BZIP2),m,n) += dmg-bz2.o
26ba25
+block-obj-dmg-bz2-$(CONFIG_BZIP2) += dmg-bz2.o
26ba25
+block-obj-$(if $(CONFIG_DMG),m,n) += $(block-obj-dmg-bz2-y)
26ba25
 dmg-bz2.o-libs     := $(BZIP2_LIBS)
26ba25
 qcow.o-libs        := -lz
26ba25
 linux-aio.o-libs   := -laio
26ba25
diff --git a/configure b/configure
26ba25
index 0cb2b79..9446f49 100755
26ba25
--- a/configure
26ba25
+++ b/configure
26ba25
@@ -450,6 +450,15 @@ tcmalloc="no"
26ba25
 jemalloc="no"
26ba25
 replication="yes"
26ba25
 vxhs=""
26ba25
+bochs="yes"
26ba25
+cloop="yes"
26ba25
+dmg="yes"
26ba25
+qcow1="yes"
26ba25
+vdi="yes"
26ba25
+vvfat="yes"
26ba25
+qed="yes"
26ba25
+parallels="yes"
26ba25
+sheepdog="yes"
26ba25
 libxml2=""
26ba25
 libudev="no"
26ba25
 
26ba25
@@ -1354,6 +1363,42 @@ for opt do
26ba25
   ;;
26ba25
   --enable-vxhs) vxhs="yes"
26ba25
   ;;
26ba25
+  --disable-bochs) bochs="no"
26ba25
+  ;;
26ba25
+  --enable-bochs) bochs="yes"
26ba25
+  ;;
26ba25
+  --disable-cloop) cloop="no"
26ba25
+  ;;
26ba25
+  --enable-cloop) cloop="yes"
26ba25
+  ;;
26ba25
+  --disable-dmg) dmg="no"
26ba25
+  ;;
26ba25
+  --enable-dmg) dmg="yes"
26ba25
+  ;;
26ba25
+  --disable-qcow1) qcow1="no"
26ba25
+  ;;
26ba25
+  --enable-qcow1) qcow1="yes"
26ba25
+  ;;
26ba25
+  --disable-vdi) vdi="no"
26ba25
+  ;;
26ba25
+  --enable-vdi) vdi="yes"
26ba25
+  ;;
26ba25
+  --disable-vvfat) vvfat="no"
26ba25
+  ;;
26ba25
+  --enable-vvfat) vvfat="yes"
26ba25
+  ;;
26ba25
+  --disable-qed) qed="no"
26ba25
+  ;;
26ba25
+  --enable-qed) qed="yes"
26ba25
+  ;;
26ba25
+  --disable-parallels) parallels="no"
26ba25
+  ;;
26ba25
+  --enable-parallels) parallels="yes"
26ba25
+  ;;
26ba25
+  --disable-sheepdog) sheepdog="no"
26ba25
+  ;;
26ba25
+  --enable-sheepdog) sheepdog="yes"
26ba25
+  ;;
26ba25
   --disable-vhost-user) vhost_user="no"
26ba25
   ;;
26ba25
   --enable-vhost-user)
26ba25
@@ -1630,6 +1675,15 @@ disabled with --disable-FEATURE, default is enabled if available:
26ba25
   qom-cast-debug  cast debugging support
26ba25
   tools           build qemu-io, qemu-nbd and qemu-image tools
26ba25
   vxhs            Veritas HyperScale vDisk backend support
26ba25
+  bochs           bochs image format support
26ba25
+  cloop           cloop image format support
26ba25
+  dmg             dmg image format support
26ba25
+  qcow1           qcow v1 image format support
26ba25
+  vdi             vdi image format support
26ba25
+  vvfat           vvfat image format support
26ba25
+  qed             qed image format support
26ba25
+  parallels       parallels image format support
26ba25
+  sheepdog        sheepdog block driver support
26ba25
   crypto-afalg    Linux AF_ALG crypto backend driver
26ba25
   vhost-user      vhost-user support
26ba25
   capstone        capstone disassembler support
26ba25
@@ -5870,6 +5924,15 @@ echo "jemalloc support  $jemalloc"
26ba25
 echo "avx2 optimization $avx2_opt"
26ba25
 echo "replication support $replication"
26ba25
 echo "VxHS block device $vxhs"
26ba25
+echo "bochs support     $bochs"
26ba25
+echo "cloop support     $cloop"
26ba25
+echo "dmg support       $dmg"
26ba25
+echo "qcow v1 support   $qcow1"
26ba25
+echo "vdi support       $vdi"
26ba25
+echo "vvfat support     $vvfat"
26ba25
+echo "qed support       $qed"
26ba25
+echo "parallels support $parallels"
26ba25
+echo "sheepdog support  $sheepdog"
26ba25
 echo "capstone          $capstone"
26ba25
 echo "libudev           $libudev"
26ba25
 
26ba25
@@ -6619,6 +6682,34 @@ if test "$vxhs" = "yes" ; then
26ba25
   echo "VXHS_LIBS= -lssl" >> $config_host_mak
26ba25
 fi
26ba25
 
26ba25
+if test "$bochs" = "yes" ; then
26ba25
+  echo "CONFIG_BOCHS=y" >> $config_host_mak
26ba25
+fi
26ba25
+if test "$cloop" = "yes" ; then
26ba25
+  echo "CONFIG_CLOOP=y" >> $config_host_mak
26ba25
+fi
26ba25
+if test "$dmg" = "yes" ; then
26ba25
+  echo "CONFIG_DMG=y" >> $config_host_mak
26ba25
+fi
26ba25
+if test "$qcow1" = "yes" ; then
26ba25
+  echo "CONFIG_QCOW1=y" >> $config_host_mak
26ba25
+fi
26ba25
+if test "$vdi" = "yes" ; then
26ba25
+  echo "CONFIG_VDI=y" >> $config_host_mak
26ba25
+fi
26ba25
+if test "$vvfat" = "yes" ; then
26ba25
+  echo "CONFIG_VVFAT=y" >> $config_host_mak
26ba25
+fi
26ba25
+if test "$qed" = "yes" ; then
26ba25
+  echo "CONFIG_QED=y" >> $config_host_mak
26ba25
+fi
26ba25
+if test "$parallels" = "yes" ; then
26ba25
+  echo "CONFIG_PARALLELS=y" >> $config_host_mak
26ba25
+fi
26ba25
+if test "$sheepdog" = "yes" ; then
26ba25
+  echo "CONFIG_SHEEPDOG=y" >> $config_host_mak
26ba25
+fi
26ba25
+
26ba25
 if test "$tcg_interpreter" = "yes"; then
26ba25
   QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/tci $QEMU_INCLUDES"
26ba25
 elif test "$ARCH" = "sparc64" ; then
26ba25
-- 
26ba25
1.8.3.1
26ba25