Blame SOURCES/libvirt-qemu-capabilities-Introduce-QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY.patch

fbe740
From b28ebb2480fb205ff10059a04745ff989d4f04b0 Mon Sep 17 00:00:00 2001
fbe740
Message-Id: <b28ebb2480fb205ff10059a04745ff989d4f04b0@dist-git>
fbe740
From: Peter Krempa <pkrempa@redhat.com>
fbe740
Date: Mon, 16 Mar 2020 22:11:38 +0100
fbe740
Subject: [PATCH] qemu: capabilities: Introduce
fbe740
 QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY
fbe740
MIME-Version: 1.0
fbe740
Content-Type: text/plain; charset=UTF-8
fbe740
Content-Transfer-Encoding: 8bit
fbe740
fbe740
The capability is based on qemu's support of using blockdev-snapshot to
fbe740
install backing chain also for images which are in use by a block-copy
fbe740
job.
fbe740
fbe740
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
fbe740
Reviewed-by: Eric Blake <eblake@redhat.com>
fbe740
(cherry picked from commit d6498be16565f23750f7e906050bdbc30678101f)
fbe740
fbe740
 Conflicts:
fbe740
	src/qemu/qemu_capabilities.c
fbe740
	src/qemu/qemu_capabilities.h
fbe740
fbe740
        QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT not backported
fbe740
fbe740
	tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
fbe740
fbe740
        Capability file update not backported
fbe740
fbe740
https://bugzilla.redhat.com/show_bug.cgi?id=1803092
fbe740
Message-Id: <8240acbad794e65a4e3c61be3fa6713e0cb181ae.1584391726.git.pkrempa@redhat.com>
fbe740
Reviewed-by: Ján Tomko <jtomko@redhat.com>
fbe740
---
fbe740
 src/qemu/qemu_capabilities.c | 2 ++
fbe740
 src/qemu/qemu_capabilities.h | 1 +
fbe740
 2 files changed, 3 insertions(+)
fbe740
fbe740
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
fbe740
index 34df4d89b3..663017157b 100644
fbe740
--- a/src/qemu/qemu_capabilities.c
fbe740
+++ b/src/qemu/qemu_capabilities.c
fbe740
@@ -559,6 +559,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
fbe740
               "virtio-net.failover",
fbe740
               "cpu.kvm-no-adjvtime",
fbe740
               "vhost-user-fs",
fbe740
+              "blockdev-snapshot.allow-write-only-overlay",
fbe740
     );
fbe740
 
fbe740
 
fbe740
@@ -1432,6 +1433,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {
fbe740
     { "blockdev-add/arg-type/+file/$dynamic-auto-read-only", QEMU_CAPS_BLOCK_FILE_AUTO_READONLY_DYNAMIC },
fbe740
     { "human-monitor-command/$savevm-monitor-nodes", QEMU_CAPS_SAVEVM_MONITOR_NODES },
fbe740
     { "blockdev-add/arg-type/+nvme", QEMU_CAPS_DRIVE_NVME },
fbe740
+    { "blockdev-snapshot/$allow-write-only-overlay", QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY },
fbe740
 };
fbe740
 
fbe740
 typedef struct _virQEMUCapsObjectTypeProps virQEMUCapsObjectTypeProps;
fbe740
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
fbe740
index e3449a9ca3..2eb8599525 100644
fbe740
--- a/src/qemu/qemu_capabilities.h
fbe740
+++ b/src/qemu/qemu_capabilities.h
fbe740
@@ -540,6 +540,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
fbe740
     QEMU_CAPS_VIRTIO_NET_FAILOVER, /* virtio-net-*.failover */
fbe740
     QEMU_CAPS_CPU_KVM_NO_ADJVTIME, /* cpu.kvm-no-adjvtime */
fbe740
     QEMU_CAPS_DEVICE_VHOST_USER_FS, /* -device vhost-user-fs */
fbe740
+    QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY, /* blockdev-snapshot has the 'allow-write-only-overlay' feature */
fbe740
 
fbe740
     QEMU_CAPS_LAST /* this must always be the last item */
fbe740
 } virQEMUCapsFlags;
fbe740
-- 
fbe740
2.25.1
fbe740