qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/3] block: Additional info string in ImageInfo and BDI
Date: Thu, 05 Sep 2013 06:25:04 -0600	[thread overview]
Message-ID: <52287820.7000506@redhat.com> (raw)
In-Reply-To: <1378382715-28132-2-git-send-email-mreitz@redhat.com>

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

On 09/05/2013 06:05 AM, Max Reitz wrote:
> Add a string for additional information to ImageInfo and
> BlockDriverInfo. Also, use this string to emit the compatibility level
> and lazy_refcount value (on compat=1.1) for qcow2.
> 
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---

> +++ b/qapi-schema.json
> @@ -238,6 +238,9 @@
>  #
>  # @backing-image: #optional info of the backing image (since 1.6)
>  #
> +# @info-string: #optional string supplying additional format-specific
> +# information (since 1.7)
> +#
>  # Since: 1.3
>  #
>  ##
> @@ -248,7 +251,7 @@
>             '*cluster-size': 'int', '*encrypted': 'bool',
>             '*backing-filename': 'str', '*full-backing-filename': 'str',
>             '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'],
> -           '*backing-image': 'ImageInfo' } }
> +           '*backing-image': 'ImageInfo', '*info-string': 'str' } }

This may work for HMP, but is LOUSY for use by QMP clients.  If you are
passing back more than a single piece of information, you are now
requiring the QMP client to do a parse of a free-form string to learn
those pieces of information.  I'd much rather see a full JSON schema
where EVERY piece of information passed back gets its own optional
field, or even where the additional information is a union type
discriminated by the image, so that we have full structure of the
information being returned rather than just an ad-hoc blobbed string.

Please rework this so that QMP clients like libvirt can easily probe
what compat mode a qcow2 image uses, without having to parse a free-form
string.

-- 
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-09-05 12:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-05 12:05 [Qemu-devel] [PATCH 0/3] Provide additional info through qemu-img info Max Reitz
2013-09-05 12:05 ` [Qemu-devel] [PATCH 1/3] block: Additional info string in ImageInfo and BDI Max Reitz
2013-09-05 12:25   ` Eric Blake [this message]
2013-09-05 12:52     ` Max Reitz
2013-09-18 14:59   ` Stefan Hajnoczi
2013-09-19  7:40     ` Max Reitz
2013-09-05 12:05 ` [Qemu-devel] [PATCH 2/3] qemu-iotests: info-string filter in _img_info Max Reitz
2013-09-05 12:05 ` [Qemu-devel] [PATCH 3/3] qemu-iotests: Additional info from qemu-img info Max Reitz

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=52287820.7000506@redhat.com \
    --to=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).