From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHZ33-0001Nq-3e for qemu-devel@nongnu.org; Thu, 05 Sep 2013 08:52:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHZ2u-00082G-S7 for qemu-devel@nongnu.org; Thu, 05 Sep 2013 08:52:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHZ2u-000827-EQ for qemu-devel@nongnu.org; Thu, 05 Sep 2013 08:52:24 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r85CqNkk010338 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 5 Sep 2013 08:52:23 -0400 Message-ID: <52287E84.50704@redhat.com> Date: Thu, 05 Sep 2013 14:52:20 +0200 From: Max Reitz MIME-Version: 1.0 References: <1378382715-28132-1-git-send-email-mreitz@redhat.com> <1378382715-28132-2-git-send-email-mreitz@redhat.com> <52287820.7000506@redhat.com> In-Reply-To: <52287820.7000506@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: Eric Blake Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi On 2013-09-05 14:25, Eric Blake wrote: > 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 >> --- >> +++ 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. > Seems very reasonable; I'll do my best. Max