qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Federico Simoncelli <fsimonce@redhat.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] block: add the optional file entry to query-block
Date: Fri, 28 Jun 2013 13:32:39 -0600	[thread overview]
Message-ID: <51CDE4D7.7090402@redhat.com> (raw)
In-Reply-To: <1372429950-20923-1-git-send-email-fsimonce@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1153 bytes --]

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 <fsimonce@redhat.com>
> ---
>  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 <eblake@redhat.com>

> +++ 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

  reply	other threads:[~2013-06-28 19:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-28 14:32 [Qemu-devel] [PATCH] block: add the optional file entry to query-block Federico Simoncelli
2013-06-28 19:32 ` Eric Blake [this message]
2013-07-01  8:34   ` Kevin Wolf
2013-07-02  8:52 ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51CDE4D7.7090402@redhat.com \
    --to=eblake@redhat.com \
    --cc=fsimonce@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).