aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2019-02-22 14:29:38 +0100
committerKevin Wolf <kwolf@redhat.com>2019-03-08 12:26:46 +0100
commit6c3944dc6219cefef6a968cf300d227fe3f92388 (patch)
treea29c719a0dd5e302ee767a839512cd388d940f93 /qapi
parent9b890bdcb6ec11868da92c1daeb51c69d9483da8 (diff)
qcow2: Implement data-file-raw create option
Provide an option to force QEMU to always keep the external data file consistent as a standalone read-only raw image. At the moment, this means making sure that write_zeroes requests are forwarded to the data file instead of just updating the metadata, and checking that no backing file is used. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/block-core.json9
1 files changed, 9 insertions, 0 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json
index e6faa94fa2..919d0530b2 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -62,6 +62,10 @@
# @data-file: the filename of the external data file that is stored in the
# image and used as a default for opening the image (since: 4.0)
#
+# @data-file-raw: True if the external data file must stay valid as a
+# standalone (read-only) raw image without looking at qcow2
+# metadata (since: 4.0)
+#
# @lazy-refcounts: on or off; only valid for compat >= 1.1
#
# @corrupt: true if the image has been marked corrupt; only valid for
@@ -80,6 +84,7 @@
'data': {
'compat': 'str',
'*data-file': 'str',
+ '*data-file-raw': 'bool',
'*lazy-refcounts': 'bool',
'*corrupt': 'bool',
'refcount-bits': 'int',
@@ -4144,6 +4149,9 @@
# @data-file Node to use as an external data file in which all guest
# data is stored so that only metadata remains in the qcow2
# file (since: 4.0)
+# @data-file-raw True if the external data file must stay valid as a
+# standalone (read-only) raw image without looking at qcow2
+# metadata (default: false; since: 4.0)
# @size Size of the virtual disk in bytes
# @version Compatibility level (default: v3)
# @backing-file File name of the backing file if a backing file
@@ -4160,6 +4168,7 @@
{ 'struct': 'BlockdevCreateOptionsQcow2',
'data': { 'file': 'BlockdevRef',
'*data-file': 'BlockdevRef',
+ '*data-file-raw': 'bool',
'size': 'size',
'*version': 'BlockdevQcow2Version',
'*backing-file': 'str',