From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VeWER-0002NS-A4 for qemu-devel@nongnu.org; Thu, 07 Nov 2013 15:31:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VeWEM-0008NY-Q8 for qemu-devel@nongnu.org; Thu, 07 Nov 2013 15:31:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36566) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VeWEM-0008NU-I4 for qemu-devel@nongnu.org; Thu, 07 Nov 2013 15:31:06 -0500 Message-ID: <527BF885.3000406@redhat.com> Date: Thu, 07 Nov 2013 13:31:01 -0700 From: Eric Blake MIME-Version: 1.0 References: <1383836503-25447-1-git-send-email-benoit@irqsave.net> <1383836503-25447-3-git-send-email-benoit@irqsave.net> In-Reply-To: <1383836503-25447-3-git-send-email-benoit@irqsave.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="iTlEqKOt8jCuropGR7qnoPXXnIn6dhh0b" Subject: Re: [Qemu-devel] [PATCH 2/2] block: Allow the user to define "node-name" option. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QmVub8OudCBDYW5ldA==?= , qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, armbru@redhat.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --iTlEqKOt8jCuropGR7qnoPXXnIn6dhh0b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11/07/2013 08:01 AM, Beno=C3=AEt Canet wrote: > As node-name is a separate name space as device-name we can enable it's= s/space as/space from/ s/it's/its/ > definition right now: nobody will use it so no harm involved. >=20 > Signed-off-by: Benoit Canet > --- > block.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) Shouldn't blockdev-add have a QMP counterpart for setting node name during device hotplug? Also, is there a QMP command for inspecting node names yet? This feels like a write-only interface if we don't have more usage of it in place. Don't get me wrong - I think we definitely want this, but in the context of a bigger series rather than by itself. >=20 > diff --git a/block.c b/block.c > index 230e71a..132981f 100644 > --- a/block.c > +++ b/block.c > @@ -885,7 +885,8 @@ int bdrv_file_open(BlockDriverState **pbs, const ch= ar *filename, > options =3D qdict_new(); > } > =20 > - bs =3D bdrv_new("", NULL); > + bs =3D bdrv_new("", qdict_get_try_str(options, "node-name")); > + qdict_del(options, "node-name"); > bs->options =3D options; > options =3D qdict_clone_shallow(options); > =20 > @@ -1007,7 +1008,8 @@ int bdrv_open_backing_file(BlockDriverState *bs, = QDict *options, Error **errp) > sizeof(backing_filename)); > } > =20 > - bs->backing_hd =3D bdrv_new("", NULL); > + bs->backing_hd =3D bdrv_new("", qdict_get_try_str(options, "node-n= ame")); > + qdict_del(options, "node-name"); > =20 > if (bs->backing_format[0] !=3D '\0') { > back_drv =3D bdrv_find_format(bs->backing_format); >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --iTlEqKOt8jCuropGR7qnoPXXnIn6dhh0b 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.4.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSe/iFAAoJEKeha0olJ0NqtaYH+wf8MQhS5rfDhpdPwJvg1QzR +197oVCH2/TXHiTvc4sconlb2BPi9is9GFj/ENaWB11Q8ri/u0YWzn8WBrbgO3j8 kCFM9EPq6AG1xJAo3sFcZQPVcCPNk8wJraPngO68Hh1n8HUrrmw263abiBIexGHH f4lewVZ/k9MfCPqs1HdC9b6AWPxU7m3mRBWtcLNNofhvO9R7MUVSkrNpydvnyl9Q UNQysjvplvx0vBCftiG1K86fgLs7bXtsOG8Rgx4CMqkoqBFMKj5qzcNFRonrvLPm IsjaQWRuUbGfw07PertPPqSbli8qaxeydYh2P8BuAOwgOh7D6Yv/acVhKcxuLtg= =jwNe -----END PGP SIGNATURE----- --iTlEqKOt8jCuropGR7qnoPXXnIn6dhh0b--