yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-qapi-Add-allow-write-only-overlay-feature-for-blockd.patch

ddf19c
From 428eb7260718b69b1f3f421d03bce10b8785fc49 Mon Sep 17 00:00:00 2001
ddf19c
From: Kevin Wolf <kwolf@redhat.com>
ddf19c
Date: Fri, 13 Mar 2020 12:34:39 +0000
ddf19c
Subject: [PATCH 19/20] qapi: Add '@allow-write-only-overlay' feature for
ddf19c
 'blockdev-snapshot'
ddf19c
ddf19c
RH-Author: Kevin Wolf <kwolf@redhat.com>
ddf19c
Message-id: <20200313123439.10548-14-kwolf@redhat.com>
ddf19c
Patchwork-id: 94290
ddf19c
O-Subject: [RHEL-AV-8.2.0 qemu-kvm PATCH v2 13/13] qapi: Add '@allow-write-only-overlay' feature for 'blockdev-snapshot'
ddf19c
Bugzilla: 1790482 1805143
ddf19c
RH-Acked-by: John Snow <jsnow@redhat.com>
ddf19c
RH-Acked-by: Daniel P. Berrange <berrange@redhat.com>
ddf19c
RH-Acked-by: Peter Krempa <pkrempa@redhat.com>
ddf19c
ddf19c
From: Peter Krempa <pkrempa@redhat.com>
ddf19c
ddf19c
Anounce that 'blockdev-snapshot' command's permissions allow changing
ddf19c
of the backing file if the 'consistent_read' permission is not required.
ddf19c
ddf19c
This is useful for libvirt to allow late opening of the backing chain
ddf19c
during a blockdev-mirror.
ddf19c
ddf19c
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
ddf19c
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ddf19c
Message-Id: <20200310113831.27293-8-kwolf@redhat.com>
ddf19c
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ddf19c
(cherry picked from commit c6bdc312f30d5c7326aa2fdca3e0f98c15eb541a)
ddf19c
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ddf19c
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
ddf19c
---
ddf19c
 qapi/block-core.json | 9 ++++++++-
ddf19c
 1 file changed, 8 insertions(+), 1 deletion(-)
ddf19c
ddf19c
diff --git a/qapi/block-core.json b/qapi/block-core.json
ddf19c
index a1e85b0..a64ad81 100644
ddf19c
--- a/qapi/block-core.json
ddf19c
+++ b/qapi/block-core.json
ddf19c
@@ -1541,6 +1541,12 @@
ddf19c
 #
ddf19c
 # For the arguments, see the documentation of BlockdevSnapshot.
ddf19c
 #
ddf19c
+# Features:
ddf19c
+# @allow-write-only-overlay: If present, the check whether this operation is safe
ddf19c
+#                            was relaxed so that it can be used to change
ddf19c
+#                            backing file of a destination of a blockdev-mirror.
ddf19c
+#                            (since 5.0)
ddf19c
+#
ddf19c
 # Since: 2.5
ddf19c
 #
ddf19c
 # Example:
ddf19c
@@ -1561,7 +1567,8 @@
ddf19c
 #
ddf19c
 ##
ddf19c
 { 'command': 'blockdev-snapshot',
ddf19c
-  'data': 'BlockdevSnapshot' }
ddf19c
+  'data': 'BlockdevSnapshot',
ddf19c
+  'features': [ 'allow-write-only-overlay' ] }
ddf19c
 
ddf19c
 ##
ddf19c
 # @change-backing-file:
ddf19c
-- 
ddf19c
1.8.3.1
ddf19c