[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V6 8/8] block: Use graph node name as reference
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH V6 8/8] block: Use graph node name as reference in bdrv_file_open(). |
Date: |
Fri, 24 Jan 2014 14:26:19 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 23.01.2014 um 21:31 hat Benoît Canet geschrieben:
> Signed-off-by: Benoit Canet <address@hidden>
> ---
> 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 = 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,
>
> if (reference) {
> if (filename || qdict_size(options)) {
> - error_setg(errp, "Cannot reference an existing block device with
> "
> + error_setg(errp, "Cannot reference an existing graph node with "
> "additional options or a new filename");
> return -EINVAL;
> }
> QDECREF(options);
>
> - bs = bdrv_find(reference);
> + bs = bdrv_find_node(reference);
> if (!bs) {
> - error_setg(errp, "Cannot find block device '%s'", reference);
> + error_setg(errp, "Cannot find graph node '%s'", reference);
> return -ENODEV;
> }
> bdrv_ref(bs);
> --
> 1.8.3.2
>
- [Qemu-devel] [PATCH V6 0/8] Giving names to graph's BlockDriverState, Benoît Canet, 2014/01/23
- [Qemu-devel] [PATCH V6 4/8] qmp: Allow to change password on named block driver states., Benoît Canet, 2014/01/23
- [Qemu-devel] [PATCH V6 3/8] qmp: Add QMP query-named-block-nodes to list the named BlockDriverState nodes., Benoît Canet, 2014/01/23
- [Qemu-devel] [PATCH V6 2/8] block: Allow the user to define "node-name" option both on command line and QMP., Benoît Canet, 2014/01/23
- [Qemu-devel] [PATCH V6 1/8] block: Add bs->node_name to hold the name of a bs node of the bs graph., Benoît Canet, 2014/01/23
- [Qemu-devel] [PATCH V6 8/8] block: Use graph node name as reference in bdrv_file_open()., Benoît Canet, 2014/01/23
- Re: [Qemu-devel] [PATCH V6 8/8] block: Use graph node name as reference in bdrv_file_open().,
Kevin Wolf <=
- Re: [Qemu-devel] [PATCH V6 8/8] block: Use graph node name as reference in bdrv_file_open()., Max Reitz, 2014/01/24
- Re: [Qemu-devel] [PATCH V6 8/8] block: Use graph node name as reference in bdrv_file_open()., Kevin Wolf, 2014/01/24
- Re: [Qemu-devel] [PATCH V6 8/8] block: Use graph node name as reference in bdrv_file_open()., Max Reitz, 2014/01/24
- Re: [Qemu-devel] [PATCH V6 8/8] block: Use graph node name as reference in bdrv_file_open()., Benoît Canet, 2014/01/27
- Re: [Qemu-devel] [PATCH V6 8/8] block: Use graph node name as reference in bdrv_file_open()., Max Reitz, 2014/01/27
- Re: [Qemu-devel] [PATCH V6 8/8] block: Use graph node name as reference in bdrv_file_open()., Benoît Canet, 2014/01/27
- Re: [Qemu-devel] [PATCH V6 8/8] block: Use graph node name as reference in bdrv_file_open()., Max Reitz, 2014/01/31
- Re: [Qemu-devel] [PATCH V6 8/8] block: Use graph node name as reference in bdrv_file_open()., Benoît Canet, 2014/01/31
[Qemu-devel] [PATCH V6 5/8] block: Create authorizations mechanism for external snapshot and resize., Benoît Canet, 2014/01/23
[Qemu-devel] [PATCH V6 6/8] qmp: Allow block_resize to manipulate bs graph nodes., Benoît Canet, 2014/01/23