From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBQr1-0005Qk-MC for qemu-devel@nongnu.org; Tue, 11 Sep 2012 09:50:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBQqv-00073t-Ks for qemu-devel@nongnu.org; Tue, 11 Sep 2012 09:50:15 -0400 Received: from mx3-phx2.redhat.com ([209.132.183.24]:60140) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBQqv-00071n-AY for qemu-devel@nongnu.org; Tue, 11 Sep 2012 09:50:09 -0400 Date: Tue, 11 Sep 2012 09:49:59 -0400 (EDT) From: Paolo Bonzini Message-ID: <945284147.67734523.1347371399653.JavaMail.root@redhat.com> In-Reply-To: <504F3ED9.6060505@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 22/47] block: make device optional in BlockInfo List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: jcody@redhat.com, eblake@redhat.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com ----- Messaggio originale ----- > Da: "Kevin Wolf" > A: "Paolo Bonzini" > Cc: qemu-devel@nongnu.org, eblake@redhat.com, jcody@redhat.com, stefanha@= linux.vnet.ibm.com > Inviato: Marted=C3=AC, 11 settembre 2012 15:38:33 > Oggetto: Re: [PATCH 22/47] block: make device optional in BlockInfo >=20 > Am 24.07.2012 13:04, schrieb Paolo Bonzini: > > Targets of a mirroring operation will not have a device. Once we > > have > > -blockdev or equivalent, "detached" block devices and non-anonymous > > backing files also will not have a device. > >=20 > > Signed-off-by: Paolo Bonzini > > --- > > qapi-schema.json | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > >=20 > > diff --git a/qapi-schema.json b/qapi-schema.json > > index fca1806..b00d8c6 100644 > > --- a/qapi-schema.json > > +++ b/qapi-schema.json > > @@ -443,7 +443,8 @@ > > # Block device information. This structure describes a virtual > > device and > > # the backing device associated with it. > > # > > -# @device: The device name associated with the virtual device. > > +# @device: #optional The device name associated with the virtual > > device. > > +# Always included in the output of query-block. > > # > > # @type: This field is returned only for compatibility reasons, it > > should > > # not be used (always returns 'unknown') > > @@ -465,7 +466,7 @@ > > # Since: 0.14.0 > > ## > > { 'type': 'BlockInfo', > > - 'data': {'device': 'str', 'type': 'str', 'removable': 'bool', > > + 'data': {'*device': 'str', 'type': 'str', 'removable': 'bool', > > 'locked': 'bool', '*inserted': 'BlockDeviceInfo', > > '*tray_open': 'bool', '*io-status': > > 'BlockDeviceIoStatus'} } >=20 > Is this really a compatible change? That 'device' is basically the > unique key by which block device are identified doesn't exactly make > feel more comfortable about the change. As long as query-block ensures that the field is present---yes. > Of course, not making it optional means that basically we need to go > the way of referencing the block device in query-block-jobs immediately > instead of thinking about it later. You know that I preferred this > from the start, and this change is just another detail that makes me thin= k > it's the right thing to do. Indeed; this patch is not anymore in the current version of the series, after your comments from July/August. Paolo