All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Benoît Canet" <benoit@irqsave.net>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, famz@redhat.com, armbru@redhat.com,
	stefanha@redhat.com
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	[thread overview]
Message-ID: <527BF885.3000406@redhat.com> (raw)
In-Reply-To: <1383836503-25447-3-git-send-email-benoit@irqsave.net>

[-- Attachment #1: Type: text/plain, Size: 1778 bytes --]

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 <benoit@irqsave.net>
> ---
>  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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

  reply	other threads:[~2013-11-07 20:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-07 15:01 [Qemu-devel] [PATCH 0/2] Giving names to graph's BlockDriverState Benoît Canet
2013-11-07 15:01 ` [Qemu-devel] [PATCH 1/2] block: Add bs->node_name to hold the name of a bs node of the bs graph Benoît Canet
2013-11-07 20:23   ` Eric Blake
2013-11-07 21:09     ` Benoît Canet
2013-11-08  9:51     ` Kevin Wolf
2013-11-07 20:54   ` Jeff Cody
2013-11-07 21:11     ` Benoît Canet
2013-11-08  8:19   ` Fam Zheng
2013-11-07 15:01 ` [Qemu-devel] [PATCH 2/2] block: Allow the user to define "node-name" option Benoît Canet
2013-11-07 20:31   ` Eric Blake [this message]
2013-11-08  9:55   ` Kevin Wolf
2013-11-07 20:34 ` [Qemu-devel] [PATCH 0/2] Giving names to graph's BlockDriverState Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=527BF885.3000406@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=benoit@irqsave.net \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.