From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wky3r-0000d5-15 for qemu-devel@nongnu.org; Thu, 15 May 2014 11:59:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wky3m-00083T-1k for qemu-devel@nongnu.org; Thu, 15 May 2014 11:59:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52132) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wky3l-00083N-QV for qemu-devel@nongnu.org; Thu, 15 May 2014 11:59:05 -0400 Message-ID: <5374E445.9070609@redhat.com> Date: Thu, 15 May 2014 09:59:01 -0600 From: Eric Blake MIME-Version: 1.0 References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ui6jCc4LKKmKU14uaDJlC3B0JNXCIUwr3" Subject: Re: [Qemu-devel] [PATCH 1/5] block: Auto-generate node_names for each BDS entry List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody , qemu-devel@nongnu.org Cc: kwolf@redhat.com, benoit.canet@irqsave.net, pkrempa@redhat.com, famz@redhat.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ui6jCc4LKKmKU14uaDJlC3B0JNXCIUwr3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05/14/2014 09:20 PM, Jeff Cody wrote: > Currently, node_name is only filled in when done so explicitly by the > user. If no node_name is specified, then the node name field is not > populated. >=20 > If node_names are automatically generated when not specified, that mean= s > that all block job operations can be done by reference to the unique > node_name field. This eliminates ambiguity in filename pathing > (relative filenames, or file descriptors, symlinks, mounts, etc..) that= > qemu currently needs to deal with. >=20 > If a node name is specified, then it will not be automatically > generated for that BDS entry. >=20 > If it is automatically generated, it will be prefaced with "__qemu##", > followed by 8 characters of a unique number, followed by 8 random > ASCII characters in the range of 'A-Z'. Some sample generated node-nam= e > strings: > __qemu##00000000IAIYNXXR > __qemu##00000002METXTRBQ > __qemu##00000001FMBORDWG >=20 > The prefix is to aid in identifying it as a qemu-generated name, the > numeric portion is to guarantee uniqueness in a given qemu session, and= > the random characters are to further avoid any accidental collisions > with user-specified node-names. >=20 > Signed-off-by: Jeff Cody > --- > block.c | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) This patch feels incomplete. We probably also ought to modify qapi-schema.json to make BlockDeviceInfo's output of 'node-name' by unconditional (as an output-only struct, changing from optional to mandatory is a safe change for back-compat API considerations); which implies further modifying code to get rid of has_node_name arguments in all places that generate BlockDeviceInfo details. See also my thoughts on patch 5/5 - can this patch be rebased to be LAST in the series, rather than first, so that it serves as a reliable witness that everything else related to block operations on node-names is complete? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ui6jCc4LKKmKU14uaDJlC3B0JNXCIUwr3 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/ iQEcBAEBCAAGBQJTdORFAAoJEKeha0olJ0Nq2T4H/2LlpFpwowiIHgnjD2gnFciy Dib/6s1g9fEd0+IZmBgrj9jS9wQrGoxp5HfZ5mG32Rs1DJiubqdml6vKSvjCp93V +emPBIw/JRv8kn4yt082QK89z1P+UiHsWQsKix7WJ4JQOkwlrDRGi7TLTwXyTg/j 4Ffqs74zwxBpMGVhgk1dgA+/v+x+QCWiqWZEuufmFA3rAbMXPi6NSZiZQh5+ALYm QCzsHZHMGgZgyT/RGoV37i6M237YT8NxZ7NUhfQrstN0SE14zbcAyRuI8XX0wveY /wlOP16X+1e58vTI86xAp2t1W6z7roRa07q0uAHTWU0fUItKdV68AGvnObcGrUk= =jKnl -----END PGP SIGNATURE----- --ui6jCc4LKKmKU14uaDJlC3B0JNXCIUwr3--