summaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2016-01-26 11:59:02 +0800
committerMax Reitz <mreitz@redhat.com>2016-02-02 17:50:48 +0100
commit16b0d555861b732c1dd76a986697214de1d774d5 (patch)
tree332c9d4b5d8bdd0a4907b09e457a43e39c7017db /qapi
parent9e4303400801e62e8e357decdb487834582459e8 (diff)
downloadqemu-16b0d555861b732c1dd76a986697214de1d774d5.tar.gz
qemu-16b0d555861b732c1dd76a986697214de1d774d5.tar.bz2
qemu-16b0d555861b732c1dd76a986697214de1d774d5.zip
qemu-img: Make MapEntry a QAPI struct
The "flags" bit mask is expanded to two booleans, "data" and "zero"; "bs" is replaced with "filename" string. Refactor the merge conditions in img_map() into entry_mergeable(). Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> Message-id: 1453780743-16806-16-git-send-email-famz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/block-core.json27
1 files changed, 27 insertions, 0 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 628a41dfca..33012b86c1 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -186,6 +186,33 @@
'*fragmented-clusters': 'int', '*compressed-clusters': 'int' } }
##
+# @MapEntry:
+#
+# Mapping information from a virtual block range to a host file range
+#
+# @start: the start byte of the mapped virtual range
+#
+# @length: the number of bytes of the mapped virtual range
+#
+# @data: whether the mapped range has data
+#
+# @zero: whether the virtual blocks are zeroed
+#
+# @depth: the depth of the mapping
+#
+# @offset: #optional the offset in file that the virtual sectors are mapped to
+#
+# @filename: #optional filename that is referred to by @offset
+#
+# Since: 2.6
+#
+##
+{ 'struct': 'MapEntry',
+ 'data': {'start': 'int', 'length': 'int', 'data': 'bool',
+ 'zero': 'bool', 'depth': 'int', '*offset': 'int',
+ '*filename': 'str' } }
+
+##
# @BlockdevCacheInfo
#
# Cache mode information for a block device