aboutsummaryrefslogtreecommitdiff
path: root/qapi/block-core.json
diff options
context:
space:
mode:
authorAndrey Drobyshev via <qemu-block@nongnu.org>2023-09-08 00:02:26 +0300
committerKevin Wolf <kwolf@redhat.com>2023-09-20 17:46:01 +0200
commit52b10c9c0c68e90f9503ba578f2eaf8975c1977f (patch)
tree7f605b83196e95f5b70c7b653fc4dc1f89c45d26 /qapi/block-core.json
parent2848289168fbbd9a6855c84ec8fde8929a2b042b (diff)
qemu-img: map: report compressed data blocks
Right now "qemu-img map" reports compressed blocks as containing data but having no host offset. This is not very informative. Instead, let's add another boolean field named "compressed" in case JSON output mode is specified. This is achieved by utilizing new allocation status flag BDRV_BLOCK_COMPRESSED for bdrv_block_status(). Also update the expected qemu-iotests outputs to contain the new field. Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> Message-ID: <20230907210226.953821-3-andrey.drobyshev@virtuozzo.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qapi/block-core.json')
-rw-r--r--qapi/block-core.json6
1 files changed, 4 insertions, 2 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 2b1d493d6e..89751d81f2 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -409,6 +409,8 @@
#
# @zero: whether the virtual blocks read as zeroes
#
+# @compressed: true if the data is stored compressed (since 8.2)
+#
# @depth: number of layers (0 = top image, 1 = top image's backing
# file, ..., n - 1 = bottom image (where n is the number of images
# in the chain)) before reaching one for which the range is
@@ -426,8 +428,8 @@
##
{ 'struct': 'MapEntry',
'data': {'start': 'int', 'length': 'int', 'data': 'bool',
- 'zero': 'bool', 'depth': 'int', 'present': 'bool',
- '*offset': 'int', '*filename': 'str' } }
+ 'zero': 'bool', 'compressed': 'bool', 'depth': 'int',
+ 'present': 'bool', '*offset': 'int', '*filename': 'str' } }
##
# @BlockdevCacheInfo: