From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvtK5-0003j9-K7 for qemu-devel@nongnu.org; Mon, 30 Jul 2012 13:00:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SvtK4-0005fa-54 for qemu-devel@nongnu.org; Mon, 30 Jul 2012 13:00:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47379) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvtK3-0005fN-S8 for qemu-devel@nongnu.org; Mon, 30 Jul 2012 13:00:00 -0400 Date: Mon, 30 Jul 2012 14:00:28 -0300 From: Luiz Capitulino Message-ID: <20120730140028.68aaabc1@doriath.home> In-Reply-To: <5016BAF1.8020302@redhat.com> References: <1343308701-29632-1-git-send-email-benoit@irqsave.net> <1343308701-29632-3-git-send-email-benoit@irqsave.net> <20120730133229.5b43f402@doriath.home> <5016BAF1.8020302@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH V5 2/4] block: Use bdrv_get_backing_file_depth() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kwolf@redhat.com, benoit.canet@gmail.com, =?ISO-8859-1?B?QmVub+50?= Canet , qemu-devel@nongnu.org, pbonzini@redhat.com, stefanha@linux.vnet.ibm.com On Mon, 30 Jul 2012 10:48:49 -0600 Eric Blake wrote: > On 07/30/2012 10:32 AM, Luiz Capitulino wrote: > > On Thu, 26 Jul 2012 15:18:19 +0200 > > benoit.canet@gmail.com wrote: > >=20 > >> From: Beno=EEt Canet > >> > >> Use the dedicated counting function in qmp_query_block in order to > >> propagate the backing file depth to HMP. > >> > >> Signed-off-by: Benoit Canet >=20 > >> +++ b/qapi-schema.json > >> @@ -398,6 +398,8 @@ > >> # > >> # @backing_file: #optional the name of the backing file (for copy-on-= write) > >> # > >> +# @backing_file_depth: number of files in the backing file chain (sin= ce: 1.2) > >> +# > >> # @encrypted: true if the backing device is encrypted > >> # > >> # @bps: total throughput limit in bytes per second is specified > >> @@ -418,9 +420,10 @@ > >> ## > >> { 'type': 'BlockDeviceInfo', > >> 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str', > >> - '*backing_file': 'str', 'encrypted': 'bool', > >> - 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int', > >> - 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} } > >> + '*backing_file': 'str', 'backing-file-depth': 'int', > >=20 > > Should use underscores, ie. should be backing_file_depth. >=20 > Really? I thought we _want_ new interfaces to use '-', not '_', in QMP. The problem is mixing them. BlockDeviceInfo already uses "_", and it's not only for backing_file. For new commands or existing commands that don't use "_", we certainly shou= ld use "-", but mixing them for the same command is probably a bad thing. > For 'backing_file', we are stuck due to back-compat (unless Anthony's > proposed patch to parse names case-insensitively with '-' and '_' folded > together is taken), We can't take Anthony's patch for what we emit. We could use it for input, but I don't think it's worth it. > but for the new field, we have no back-compat > constraints, and I would prefer backing-file-depth. It's like not I can't be convinced, but I think we shouldn't mix "-" and "_" for the same command. >=20 > At any rate, you definitely need to make sure you agree between the docs > above and the JSON statement below (as written, you have both spellings > in the same patch). >=20