Received: from eggs.gnu.org ([2001:4830:134:3::10]:46525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6gmG-0002Ia-C7 for qemu-devel@nongnu.org; Fri, 24 Jan 2014 08:26:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W6gmB-00041q-4m for qemu-devel@nongnu.org; Fri, 24 Jan 2014 08:26:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53733) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6gmA-00041h-Rk for qemu-devel@nongnu.org; Fri, 24 Jan 2014 08:26:27 -0500 Date: Fri, 24 Jan 2014 14:26:19 +0100 From: Kevin Wolf Message-ID: <20140124132619.GF3342@dhcp-200-207.str.redhat.com> References: <1390509099-695-1-git-send-email-benoit.canet@irqsave.net> <1390509099-695-9-git-send-email-benoit.canet@irqsave.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1390509099-695-9-git-send-email-benoit.canet@irqsave.net> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH V6 8/8] block: Use graph node name as reference in bdrv_file_open(). List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Beno=EEt?= Canet Cc: famz@redhat.com, Benoit Canet , armbru@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, mreitz@redhat.com Am 23.01.2014 um 21:31 hat Beno=EEt Canet geschrieben: > Signed-off-by: Benoit Canet > --- > block.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) I'm not going to merge this one yet. It breaks qemu-iotests case 071, which would have to be adapted. However, first of all I'd like to hear the opinions of at least Eric and Max on what BlockRef should really refer to. I think node names make most sense, but perhaps it's a bit inconvenient and the command line should default to node-name =3D id when id is set, but node-name isn't? Kevin > diff --git a/block.c b/block.c > index 3e0994b..7726636 100644 > --- a/block.c > +++ b/block.c > @@ -908,15 +908,15 @@ int bdrv_file_open(BlockDriverState **pbs, const = char *filename, > =20 > if (reference) { > if (filename || qdict_size(options)) { > - error_setg(errp, "Cannot reference an existing block devic= e with " > + error_setg(errp, "Cannot reference an existing graph node = with " > "additional options or a new filename"); > return -EINVAL; > } > QDECREF(options); > =20 > - bs =3D bdrv_find(reference); > + bs =3D bdrv_find_node(reference); > if (!bs) { > - error_setg(errp, "Cannot find block device '%s'", referenc= e); > + error_setg(errp, "Cannot find graph node '%s'", reference)= ; > return -ENODEV; > } > bdrv_ref(bs); > --=20 > 1.8.3.2 >=20