From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxY7t-0004US-AE for qemu-devel@nongnu.org; Thu, 19 Jun 2014 04:55:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxY7k-0003NZ-5b for qemu-devel@nongnu.org; Thu, 19 Jun 2014 04:55:21 -0400 Received: from mail-we0-x235.google.com ([2a00:1450:400c:c03::235]:57257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxY7j-0003NT-V4 for qemu-devel@nongnu.org; Thu, 19 Jun 2014 04:55:12 -0400 Received: by mail-we0-f181.google.com with SMTP id q59so2028242wes.12 for ; Thu, 19 Jun 2014 01:55:11 -0700 (PDT) Date: Thu, 19 Jun 2014 16:55:02 +0800 From: Stefan Hajnoczi Message-ID: <20140619085502.GR21236@stefanha-thinkpad.redhat.com> References: <526da734a5f3cffd2eb56accafdb4add38c75270.1403041699.git.jcody@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="y2MHPAl/EzyWgzIZ" Content-Disposition: inline In-Reply-To: <526da734a5f3cffd2eb56accafdb4add38c75270.1403041699.git.jcody@redhat.com> Subject: Re: [Qemu-devel] [PATCH v6 for 2.1 01/10] block: Auto-generate node_names for each BDS entry List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: kwolf@redhat.com, benoit.canet@irqsave.net, pkrempa@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com --y2MHPAl/EzyWgzIZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 17, 2014 at 05:53:49PM -0400, 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 means > that all block job operations can be done by reference to the unique > node_name field. This eliminates ambiguity in resolving filenames > (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-name > 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 > Reviewed-by: Eric Blake > Signed-off-by: Jeff Cody > --- > block.c | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) Who is this feature for? Human users: they'll need to read through query-named-block-nodes output to find the nodes they care about. This is pretty cumbersome and not human-friendly. Management tools: parsing query-named-block-nodes isn't trivial since the output can vary between QEMU versions (e.g. when we move I/O throttling to a block driver node there will be new internal nodes). Tools doing this should really use blockdev-add instead and assign their own node names. It seems like neither type of user will get much mileage out of this feature. Is it really necessary or did I miss a use case? Stefan --y2MHPAl/EzyWgzIZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJToqVmAAoJEJykq7OBq3PIHTUH/3rWVAjDIuT7DXYVkvY3jJ16 ZVCBUON49vsY5/gH9ubPuJI23B68ysr9YNHKHimPwH2905f2mkIbGlyUNwgkcCTQ kOmRSlpDNuPPTS027CLbjXBSJebk+rp4q9I5UCcs6U+o5ElpdzYATQf4tmMIXRfB 7ZWP5+oS7iBAMIgdx5tmOa3udNLlW+ESSahSOYMY/ExdMqbkNe+TfBgOzuQZlnl1 QL40KaT411958sJebgPOV5VSWChOreRZRrRaFBrrrYahm/ZGDmRFOtcAlr3SEl1c DYIEUZYSq0e9Q0mDqKOeeOevv6KK5ID1kHbrlRS4AXL0nve4q2iFIa+GNBHAO74= =FhZA -----END PGP SIGNATURE----- --y2MHPAl/EzyWgzIZ--