qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] block: Allow the user to define "node-name"


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 2/2] block: Allow the user to define "node-name" option.
Date: Thu, 07 Nov 2013 13:31:01 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

On 11/07/2013 08:01 AM, Benoît 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.
> 
> Signed-off-by: Benoit Canet <address@hidden>
> ---
>  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.

> 
> 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 char 
> *filename,
>          options = qdict_new();
>      }
>  
> -    bs = bdrv_new("", NULL);
> +    bs = bdrv_new("", qdict_get_try_str(options, "node-name"));
> +    qdict_del(options, "node-name");
>      bs->options = options;
>      options = qdict_clone_shallow(options);
>  
> @@ -1007,7 +1008,8 @@ int bdrv_open_backing_file(BlockDriverState *bs, QDict 
> *options, Error **errp)
>                                         sizeof(backing_filename));
>      }
>  
> -    bs->backing_hd = bdrv_new("", NULL);
> +    bs->backing_hd = bdrv_new("", qdict_get_try_str(options, "node-name"));
> +    qdict_del(options, "node-name");
>  
>      if (bs->backing_format[0] != '\0') {
>          back_drv = bdrv_find_format(bs->backing_format);
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]