All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Wen Congyang <wency@cn.fujitsu.com>,
	qemu devel <qemu-devel@nongnu.org>,
	Alberto Garcia <berto@igalia.com>, Kevin Wolf <kwolf@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Cc: zhanghailiang <zhang.zhanghailiang@huawei.com>,
	qemu block <qemu-block@nongnu.org>,
	Jiang Yunhong <yunhong.jiang@intel.com>,
	Dong Eddie <eddie.dong@intel.com>,
	Markus Armbruster <armbru@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Gonglei <arei.gonglei@huawei.com>
Subject: Re: [Qemu-devel] [Patch v7 3/3] qmp: add monitor command to add/remove a child
Date: Mon, 23 Nov 2015 09:30:32 -0700	[thread overview]
Message-ID: <56533F28.7000204@redhat.com> (raw)
In-Reply-To: <1448259825-3382-4-git-send-email-wency@cn.fujitsu.com>

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

On 11/22/2015 11:23 PM, Wen Congyang wrote:
> The new QMP command name is x-blockdev-change. It justs for adding/removing

s/It justs/It's just/

> quorum's child now, and don't support all kinds of children, all kinds of

s/don't/doesn't/

> operations, nor all block drivers. So it is experimental now.
> 
> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
> Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> ---

> +++ b/qapi/block-core.json
> @@ -2400,3 +2400,28 @@
>  ##
>  { 'command': 'block-set-write-threshold',
>    'data': { 'node-name': 'str', 'write-threshold': 'uint64' } }
> +
> +##
> +# @x-blockdev-change
> +#
> +# Dynamically reconfigure the block driver state graph. It can be used
> +# to add, remove, insert or replace a block driver state. Currently only
> +# the Quorum driver implements this feature to add or remove its child.
> +# This is useful to fix a broken quorum child.
> +#
> +# @operation: the change operation. It can be add, delete.

Documented but not present below.  Are you missing a parameter, or
should this line be deleted?

> +#
> +# @parent: the id or name of the node that will be changed.
> +#
> +# @child: #optional the name of the child that will be deleted.
> +#
> +# @node: #optional the name of the node will be added.
> +#
> +# Note: this command is experimental, and its API is not stable.
> +#
> +# Since: 2.6
> +##
> +{ 'command': 'x-blockdev-change',
> +  'data' : { 'parent': 'str',
> +             '*child': 'str',
> +             '*node': 'str' } }

> +++ b/qmp-commands.hx
> @@ -4285,6 +4285,53 @@ Example:
>  EQMP
>  
>      {
> +        .name       = "x-blockdev-change",
> +        .args_type  = "parent:B,child:B?,node:B?",
> +        .mhandler.cmd_new = qmp_marshal_x_blockdev_change,
> +    },
> +
> +SQMP
> +x-blockdev-change
> +------------

Make the --- divider as long as the text it is underlining.

> +
> +Dynamic reconfigure the block driver state graph. It can be used to

s/Dynamic/Dynamically/

> +add, remove, insert, replace a block driver state. Currently only

s/replace/or replace/

Isn't 'add' and 'insert' the same thing?

> +the Quorum driver implements this feature to add and remove its child.
> +This is useful to fix a broken quorum child.
> +
> +Arguments:
> +- "parent": the id or node name of which node will be changed
> +- "child": the child name which will be delete

s/delete/deleted/; mention that it is optional (if nothing is going to
be delted)

> +- "node": the new node-name which will be added

mention that it is optional (if nothing is going to be added)

> +
> +Note: this command is experimental, and not a stable API. It doesn't
> +support all kinds of operations, all kindes of children, nor all block

s/kindes/kinds/

> +drivers.
> +
> +Example:
> +
> +Add a new quorum's node

s/quorum's node/node to a quorum/

> +-> { "execute": blockdev-add",
> +    "arguments": { "options": { "driver": "raw",
> +                                "node-name": "new_node",
> +                                "id": "test_new_node",
> +                                "file": { "driver": "file",
> +                                          "filename": "test.raw" } } } }
> +<- { "return": {} }
> +-> { "execute": "x-blockdev-change",
> +    "arguments": { "parent": "disk1",
> +                   "node": "new_node" } }
> +<- { "return": {} }
> +
> +Delete a quorum's node
> +-> { "execute": "x-blockdev-change",
> +    "arguments": { "parent": "disk1",
> +                   "child": "children.2" } }
> +<- { "return": {} }
> +
> +EQMP
> +
> +    {
>          .name       = "query-named-block-nodes",
>          .args_type  = "",
>          .mhandler.cmd_new = qmp_marshal_query_named_block_nodes,
> 

-- 
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: 604 bytes --]

  reply	other threads:[~2015-11-23 16:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-23  6:23 [Qemu-devel] [Patch v7 0/3] qapi: child add/delete support Wen Congyang
2015-11-23  6:23 ` [Qemu-devel] [Patch v7 1/3] Add new block driver interface to add/delete a BDS's child Wen Congyang
2015-11-23  6:23 ` [Qemu-devel] [Patch v7 2/3] quorum: implement bdrv_add_child() and bdrv_del_child() Wen Congyang
2015-11-23  6:23 ` [Qemu-devel] [Patch v7 3/3] qmp: add monitor command to add/remove a child Wen Congyang
2015-11-23 16:30   ` Eric Blake [this message]
2015-11-24  0:50     ` Wen Congyang

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=56533F28.7000204@redhat.com \
    --to=eblake@redhat.com \
    --cc=arei.gonglei@huawei.com \
    --cc=armbru@redhat.com \
    --cc=berto@igalia.com \
    --cc=dgilbert@redhat.com \
    --cc=eddie.dong@intel.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=wency@cn.fujitsu.com \
    --cc=yunhong.jiang@intel.com \
    --cc=zhang.zhanghailiang@huawei.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.