qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] block: add the optional file entry to query-blo


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] block: add the optional file entry to query-block
Date: Fri, 28 Jun 2013 13:32:39 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6

On 06/28/2013 08:32 AM, Federico Simoncelli wrote:
> This patch adds the optional file entry to the query-block output.
> The value is a json-object representing the information about the
> underlying file or device (when present).
> 
> Signed-off-by: Federico Simoncelli <address@hidden>
> ---
>  block/qapi.c               |    9 ++++++++-
>  qapi-schema.json           |    4 +++-
>  qmp-commands.hx            |    8 ++++++++
>  tests/qemu-iotests/043.out |   15 +++++++++++++++
>  4 files changed, 34 insertions(+), 2 deletions(-)

Reviewed-by: Eric Blake <address@hidden>

> +++ b/block/qapi.c
> @@ -119,7 +119,7 @@ void bdrv_query_image_info(BlockDriverState *bs,
>  
>      info->filename        = g_strdup(bs->filename);
>      info->format          = g_strdup(bdrv_get_format_name(bs));
> -    info->virtual_size    = total_sectors * 512;
> +    info->virtual_size    = bdrv_getlength(bs);

This change seems independently useful, but I'm not sure if it's worth
splitting out into a separate patch.

-- 
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]