From facd6e2b5c0217f9d9eeb2ee497dda28009518bd Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 4 Sep 2013 19:00:34 +0200 Subject: docs, qapi: document qemu-img map Eric Blake also requested including the output in qapi-schema.json, so that it is published through the introspection mechanism. Signed-off-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- qapi-schema.json | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index 5d5164f9e2..2b2c8bce07 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -830,6 +830,35 @@ ## { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] } +## +# @BlockDeviceMapEntry: +# +# Entry in the metadata map of the device (returned by "qemu-img map") +# +# @start: Offset in the image of the first byte described by this entry +# (in bytes) +# +# @length: Length of the range described by this entry (in bytes) +# +# @depth: Number of layers (0 = top image, 1 = top image's backing file, etc.) +# before reaching one for which the range is allocated. The value is +# in the range 0 to the depth of the image chain - 1. +# +# @zero: the sectors in this range read as zeros +# +# @data: reading the image will actually read data from a file (in particular, +# if @offset is present this means that the sectors are not simply +# preallocated, but contain actual data in raw format) +# +# @offset: if present, the image file stores the data for this range in +# raw format at the given offset. +# +# Since 1.7 +## +{ 'type': 'BlockDeviceMapEntry', + 'data': { 'start': 'int', 'length': 'int', 'depth': 'int', 'zero': 'bool', + 'data': 'bool', '*offset': 'int' } } + ## # @BlockDirtyInfo: # -- cgit v1.2.1