qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] block: add apparent-size to query-block


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] block: add apparent-size to query-block
Date: Fri, 21 Jun 2013 21:06:55 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6

On 06/21/2013 05:18 PM, Federico Simoncelli wrote:
> This patch adds the apparent-size entry to the query-block output.
> The value represents the apparent size in bytes of the image, e.g.
> file size (including the blocks not yet allocated) or block device
> size.
> 
> Signed-off-by: Federico Simoncelli <address@hidden>
> ---
>  block/qapi.c     |    3 ++-
>  qapi-schema.json |    4 +++-
>  qmp-commands.hx  |    1 +
>  3 files changed, 6 insertions(+), 2 deletions(-)
> 

> +++ b/qapi-schema.json
> @@ -222,6 +222,8 @@
>  #
>  # @actual-size: #optional actual size on disk in bytes of the image
>  #
> +# @apparent-size: apparent size in bytes of the image

Worth adding a '(since 1.6)' notation.  Is there any more documentation
you can list here to differentiate between the different sizes?

> +#
>  # @dirty-flag: #optional true if image is not cleanly closed
>  #
>  # @cluster-size: #optional size of a cluster in bytes
> @@ -244,7 +246,7 @@
>  
>  { 'type': 'ImageInfo',
>    'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
> -           '*actual-size': 'int', 'virtual-size': 'int',
> +           '*actual-size': 'int', 'virtual-size': 'int', 'apparent-size': 
> 'int',

Long line; may be worth wrapping.  Is this parameter always present,
even if it is identical to 'actual-size' for some file formats, or
should it be marked optional?

qemu-img should be enhanced to output the new information.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]