diff options
author | Fam Zheng <famz@redhat.com> | 2016-01-26 11:59:02 +0800 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2016-02-02 17:50:48 +0100 |
commit | 16b0d555861b732c1dd76a986697214de1d774d5 (patch) | |
tree | 332c9d4b5d8bdd0a4907b09e457a43e39c7017db /qapi/block-core.json | |
parent | 9e4303400801e62e8e357decdb487834582459e8 (diff) |
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/block-core.json')
-rw-r--r-- | qapi/block-core.json | 27 |
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 |