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

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