From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKsuH-0000LS-Cu for qemu-devel@nongnu.org; Mon, 09 Feb 2015 13:18:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YKsuC-0003Zd-Dz for qemu-devel@nongnu.org; Mon, 09 Feb 2015 13:18:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55753) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKsuC-0003ZU-66 for qemu-devel@nongnu.org; Mon, 09 Feb 2015 13:17:56 -0500 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 t19IHtJB023014 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 9 Feb 2015 13:17:55 -0500 Message-ID: <54D8F9D2.5000506@redhat.com> Date: Mon, 09 Feb 2015 11:17:54 -0700 From: Eric Blake MIME-Version: 1.0 References: <1423501897-30410-1-git-send-email-mreitz@redhat.com> <1423501897-30410-2-git-send-email-mreitz@redhat.com> In-Reply-To: <1423501897-30410-2-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="IivoqRs2tWWUtltgTkMShkTFjr1xDXxQB" Subject: Re: [Qemu-devel] [PATCH v2 01/37] blockdev: Allow creation of BDS trees without BB List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , John Snow , Markus Armbruster , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --IivoqRs2tWWUtltgTkMShkTFjr1xDXxQB Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/09/2015 10:11 AM, Max Reitz wrote: > If the "id" field is missing from the options given to blockdev-add, > just omit the BlockBackend and create the BlockDriverState tree alone. >=20 > However, if "id" is missing, "node-name" must be specified; otherwise, > the BDS tree would no longer be accessible. >=20 Well, if we ever revived Jeff Cody's attempt at auto-assigning node names (so that we never have an unnamed node), then this patch will have to be partially reverted at that time (omitting id and node-name then results in a BDS with an auto-assigned node name and no BB). But that's a decision for that series (if we ever revive it); for now, your policy is just fine. > Signed-off-by: Max Reitz > --- > blockdev.c | 44 +++++++++++++++++++++++++++++++-------= ------ > qapi/block-core.json | 13 +++++++++---- > tests/qemu-iotests/087 | 2 +- > tests/qemu-iotests/087.out | 4 ++-- > 4 files changed, 43 insertions(+), 20 deletions(-) Reviewed-by: Eric Blake > +++ b/qapi/block-core.json > @@ -1260,9 +1260,12 @@ > # > # @driver: block driver name > # @id: #optional id by which the new block device can be re= ferred to. > -# This is a required option on the top level of blockd= ev-add, and > -# currently not allowed on any other level. > -# @node-name: #optional the name of a block driver state node (Sin= ce 2.0) > +# This option is only allowed on the top level of bloc= kdev-add. > +# A BlockBackend will be created by blockdev-add if an= d only if > +# this option is given. I know what you mean here, but it feels a tiny bit like we are leaking implementation details. Would it be any better to state that: "A guest-visible device will be created by blockdev-add if and only if this option is given"? That is, instead of BlockDriverState and BlockBackend (which are internal naming conventions), should our documentation be favoring "node within a tree of host-accessible resources that provide the media content to a guest device" and "guest-visible device"? But just in typing that out, it gets tedious, and even if we do make such a change in documentation, it would be better to do it over all existing =2Ejson files rather than just this patch. Furthermore, we may use BlockBackend for things like NBD fleecing operations, which really aren't guest-visible devices. So my idle ramblings here don't affect my R-b for the patch as-is. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --IivoqRs2tWWUtltgTkMShkTFjr1xDXxQB 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJU2PnSAAoJEKeha0olJ0Nq59wH/Rf8X+GQgEiPpPKPOltBDFka Bis6ufAvmV4m8joCENypJjjtzzrl7mrM/oEGoUD/gGmO+6YJeABZAgm/4TKswAZE 32VNJ521Mipi6su2pNgRKKhK0S04sQiGzFiwxPxwGGL93Tm1NMQB8erX1n9WAohF bCQ//iBn7tOLL8lK7HQv02DmZ6IR/GtD0r6h67mDEf3Z1jadukOIODeOIJHMxaF+ c80vCLzhlFFIDDhqaOhsxrbvs9ZRkSJr9s+M2HU4bbiuIfVIyv1klAoYm/CkcX3U dM5Y6rO3WGdOaemkMG6p0otYwQ1v+9O132btSA6LOIlWCB20hf92mKfCyFS7FrE= =5CtZ -----END PGP SIGNATURE----- --IivoqRs2tWWUtltgTkMShkTFjr1xDXxQB--