All of lore.kernel.org
 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 apparent-size to query-block
Date: Fri, 21 Jun 2013 21:06:55 +0100	[thread overview]
Message-ID: <51C4B25F.2060603@redhat.com> (raw)
In-Reply-To: <1371831528-1128-1-git-send-email-fsimonce@redhat.com>

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

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

  reply	other threads:[~2013-06-21 20:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-21 16:18 [Qemu-devel] [PATCH] block: add apparent-size to query-block Federico Simoncelli
2013-06-21 20:06 ` Eric Blake [this message]
2013-06-24 12:22 ` Kevin Wolf

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=51C4B25F.2060603@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.