aboutsummaryrefslogtreecommitdiff
path: root/qapi/block-core.json
diff options
context:
space:
mode:
authorAndrey Shinkevich <andrey.shinkevich@virtuozzo.com>2019-02-08 18:06:07 +0300
committerEric Blake <eblake@redhat.com>2019-02-11 14:35:43 -0600
commitb8968c875f4030dd6924d6971bb3d92dfa3d2f65 (patch)
tree2faef1ceb11b64be4ade3fb50a4e6e34bbe7afc5 /qapi/block-core.json
parent1bf6e9ca9234e1dbcaa18baa06eca9d55cc2dbbb (diff)
qcow2: Add list of bitmaps to ImageInfoSpecificQCow2
In the 'Format specific information' section of the 'qemu-img info' command output, the supplemental information about existing QCOW2 bitmaps will be shown, such as a bitmap name, flags and granularity: image: /vz/vmprivate/VM1/harddisk.hdd file format: qcow2 virtual size: 64G (68719476736 bytes) disk size: 3.0M cluster_size: 1048576 Format specific information: compat: 1.1 lazy refcounts: true bitmaps: [0]: flags: [0]: in-use [1]: auto name: back-up1 granularity: 65536 [1]: flags: [0]: in-use [1]: auto name: back-up2 granularity: 65536 refcount bits: 16 corrupt: false Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <1549638368-530182-3-git-send-email-andrey.shinkevich@virtuozzo.com> Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'qapi/block-core.json')
-rw-r--r--qapi/block-core.json41
1 files changed, 40 insertions, 1 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 5f17d67d71..0f349d4603 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -69,6 +69,8 @@
# @encrypt: details about encryption parameters; only set if image
# is encrypted (since 2.10)
#
+# @bitmaps: A list of qcow2 bitmap details (since 4.0)
+#
# Since: 1.7
##
{ 'struct': 'ImageInfoSpecificQCow2',
@@ -77,7 +79,8 @@
'*lazy-refcounts': 'bool',
'*corrupt': 'bool',
'refcount-bits': 'int',
- '*encrypt': 'ImageInfoSpecificQCow2Encryption'
+ '*encrypt': 'ImageInfoSpecificQCow2Encryption',
+ '*bitmaps': ['Qcow2BitmapInfo']
} }
##
@@ -454,6 +457,42 @@
'status': 'DirtyBitmapStatus'} }
##
+# @Qcow2BitmapInfoFlags:
+#
+# An enumeration of flags that a bitmap can report to the user.
+#
+# @in-use: This flag is set by any process actively modifying the qcow2 file,
+# and cleared when the updated bitmap is flushed to the qcow2 image.
+# The presence of this flag in an offline image means that the bitmap
+# was not saved correctly after its last usage, and may contain
+# inconsistent data.
+#
+# @auto: The bitmap must reflect all changes of the virtual disk by any
+# application that would write to this qcow2 file.
+#
+# Since: 4.0
+##
+{ 'enum': 'Qcow2BitmapInfoFlags',
+ 'data': ['in-use', 'auto'] }
+
+##
+# @Qcow2BitmapInfo:
+#
+# Qcow2 bitmap information.
+#
+# @name: the name of the bitmap
+#
+# @granularity: granularity of the bitmap in bytes
+#
+# @flags: flags of the bitmap
+#
+# Since: 4.0
+##
+{ 'struct': 'Qcow2BitmapInfo',
+ 'data': {'name': 'str', 'granularity': 'uint32',
+ 'flags': ['Qcow2BitmapInfoFlags'] } }
+
+##
# @BlockLatencyHistogramInfo:
#
# Block latency histogram.