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

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