|
|
a83cc2 |
From acdc84c1077be7d347414f781014ea785ce41d7b Mon Sep 17 00:00:00 2001
|
|
|
a83cc2 |
From: Kevin Wolf <kwolf@redhat.com>
|
|
|
a83cc2 |
Date: Fri, 13 Mar 2020 12:34:32 +0000
|
|
|
a83cc2 |
Subject: block: Versioned x-blockdev-reopen API with feature flag
|
|
|
a83cc2 |
|
|
|
a83cc2 |
RH-Author: Kevin Wolf <kwolf@redhat.com>
|
|
|
a83cc2 |
Message-id: <20200313123439.10548-7-kwolf@redhat.com>
|
|
|
a83cc2 |
Patchwork-id: 94283
|
|
|
a83cc2 |
O-Subject: [RHEL-AV-8.2.0 qemu-kvm PATCH v2 06/13] block: Versioned x-blockdev-reopen API with feature flag
|
|
|
a83cc2 |
Bugzilla: 1790482 1805143
|
|
|
a83cc2 |
RH-Acked-by: Eric Blake <eblake@redhat.com>
|
|
|
a83cc2 |
RH-Acked-by: John Snow <jsnow@redhat.com>
|
|
|
a83cc2 |
RH-Acked-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
a83cc2 |
RH-Acked-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
a83cc2 |
|
|
|
a83cc2 |
x-blockdev-reopen is still considered unstable upstream. libvirt needs
|
|
|
a83cc2 |
(a small subset of) it for incremental backups, though.
|
|
|
a83cc2 |
|
|
|
a83cc2 |
Add a downstream-only feature flag that effectively makes this a
|
|
|
a83cc2 |
versioned interface. As long as the feature is present, we promise that
|
|
|
a83cc2 |
we won't change the interface incompatibly. Incompatible changes to the
|
|
|
a83cc2 |
command will require us to drop the feature flag (and possibly introduce
|
|
|
a83cc2 |
a new one if the new version is still not stable upstream).
|
|
|
a83cc2 |
|
|
|
a83cc2 |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
a83cc2 |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
a83cc2 |
---
|
|
|
a83cc2 |
qapi/block-core.json | 9 ++++++++-
|
|
|
a83cc2 |
scripts/qapi/expr.py | 2 +-
|
|
|
a83cc2 |
2 files changed, 9 insertions(+), 2 deletions(-)
|
|
|
a83cc2 |
|
|
|
a83cc2 |
diff --git a/qapi/block-core.json b/qapi/block-core.json
|
|
|
a83cc2 |
index 6d227924d0..15ad8cee05 100644
|
|
|
a83cc2 |
--- a/qapi/block-core.json
|
|
|
a83cc2 |
+++ b/qapi/block-core.json
|
|
|
a83cc2 |
@@ -4166,10 +4166,17 @@
|
|
|
a83cc2 |
# image does not have a default backing file name as part of its
|
|
|
a83cc2 |
# metadata.
|
|
|
a83cc2 |
#
|
|
|
a83cc2 |
+# Features:
|
|
|
a83cc2 |
+# @__com.redhat_rhel-av-8_2_0-api: Versioning the downstream interface while
|
|
|
a83cc2 |
+# it's still unstable upstream. As long as
|
|
|
a83cc2 |
+# this flag is present, this command will not
|
|
|
a83cc2 |
+# change incompatibly.
|
|
|
a83cc2 |
+#
|
|
|
a83cc2 |
# Since: 4.0
|
|
|
a83cc2 |
##
|
|
|
a83cc2 |
{ 'command': 'x-blockdev-reopen',
|
|
|
a83cc2 |
- 'data': 'BlockdevOptions', 'boxed': true }
|
|
|
a83cc2 |
+ 'data': 'BlockdevOptions', 'boxed': true,
|
|
|
a83cc2 |
+ 'features': [ '__com.redhat_rhel-av-8_2_0-api' ] }
|
|
|
a83cc2 |
|
|
|
a83cc2 |
##
|
|
|
a83cc2 |
# @blockdev-del:
|
|
|
a83cc2 |
diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py
|
|
|
a83cc2 |
index 540b3982b1..884874d205 100644
|
|
|
a83cc2 |
--- a/scripts/qapi/expr.py
|
|
|
a83cc2 |
+++ b/scripts/qapi/expr.py
|
|
|
a83cc2 |
@@ -215,7 +215,7 @@ def check_features(features, info):
|
|
|
a83cc2 |
check_keys(f, info, source, ['name'], ['if'])
|
|
|
a83cc2 |
check_name_is_str(f['name'], info, source)
|
|
|
a83cc2 |
source = "%s '%s'" % (source, f['name'])
|
|
|
a83cc2 |
- check_name_lower(f['name'], info, source)
|
|
|
a83cc2 |
+ check_name_lower(f['name'], info, source, permit_underscore=True)
|
|
|
a83cc2 |
check_if(f, info, source)
|
|
|
a83cc2 |
|
|
|
a83cc2 |
|
|
|
a83cc2 |
--
|
|
|
a83cc2 |
2.27.0
|
|
|
a83cc2 |
|