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: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] block: add the optional file entry to query-block
Date: Tue, 2 Jul 2013 10:52:51 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Jun 28, 2013 at 10:32:30AM -0400, 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(-)
> 
> diff --git a/block/qapi.c b/block/qapi.c
> index a4bc411..03cd222 100644
> --- a/block/qapi.c
> +++ 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);
>      info->actual_size     = bdrv_get_allocated_file_size(bs);
>      info->has_actual_size = info->actual_size >= 0;
>      if (bdrv_is_encrypted(bs)) {

Now total_sectors is unused.  Why make this change?



reply via email to

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