From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHYca-00046J-Fv for qemu-devel@nongnu.org; Thu, 05 Sep 2013 08:25:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHYcV-0008Hq-CC for qemu-devel@nongnu.org; Thu, 05 Sep 2013 08:25:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHYcV-0008Ha-44 for qemu-devel@nongnu.org; Thu, 05 Sep 2013 08:25:07 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r85CP5VM017510 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 5 Sep 2013 08:25:06 -0400 Message-ID: <52287820.7000506@redhat.com> Date: Thu, 05 Sep 2013 06:25:04 -0600 From: Eric Blake MIME-Version: 1.0 References: <1378382715-28132-1-git-send-email-mreitz@redhat.com> <1378382715-28132-2-git-send-email-mreitz@redhat.com> In-Reply-To: <1378382715-28132-2-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="HeSq8LC6koDmrHw84qnw8kuprAgs8U5mv" Subject: Re: [Qemu-devel] [PATCH 1/3] block: Additional info string in ImageInfo and BDI List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HeSq8LC6koDmrHw84qnw8kuprAgs8U5mv Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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=3D1.1) for qcow2. >=20 > Signed-off-by: Max Reitz > --- > +++ 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': ['Snapshot= Info'], > - '*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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --HeSq8LC6koDmrHw84qnw8kuprAgs8U5mv Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSKHggAAoJEKeha0olJ0NqCG4IAIotAN6zPsioN0wzaN0wn3Il AgYLbdrtMdJw0fXbuXnRtg0oh9ZkSnz9sjLjELERQzLnf1xhmwoTmIsLIVmhSvXu Up0ISo8Fqo36Lv8dU5H+pACP9eih70XyoEoqaTwhQGV29vMkGTQoRUmv7pdg5bW4 SWCm9p6hoxhSEqw+CTVS8ecpVfUzLmWweNGehRVDKlP/Kn33/5NyglWqr3CnGTOc 7PoDWOLQ3ihV85fGL9GRrMBegd7vaP3GPWjsByCqE9X9VFsgKlaZt4pMDSshqlMf mldlAHMc8lBHTvcP9wND/kbOSxKWFavrrWyHtTe3BaTaJtb0nBQdt7/Ng2+BZtw= =9Mf6 -----END PGP SIGNATURE----- --HeSq8LC6koDmrHw84qnw8kuprAgs8U5mv--