From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuKvG-0003xA-6e for qemu-devel@nongnu.org; Thu, 05 Nov 2015 08:49:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZuKvC-0004ab-6E for qemu-devel@nongnu.org; Thu, 05 Nov 2015 08:49:50 -0500 From: Alberto Garcia In-Reply-To: <1444985866-12969-4-git-send-email-wency@cn.fujitsu.com> References: <1444985866-12969-1-git-send-email-wency@cn.fujitsu.com> <1444985866-12969-4-git-send-email-wency@cn.fujitsu.com> Date: Thu, 05 Nov 2015 14:49:03 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH v6 3/4] qmp: add monitor command to add/remove a child List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wen Congyang , qemu devel , Eric Blake , Markus Armbruster , Kevin Wolf , Stefan Hajnoczi Cc: qemu block , Jiang Yunhong , Dong Eddie , "Dr. David Alan Gilbert" , Gonglei , Yang Hongyang , zhanghailiang On Fri 16 Oct 2015 10:57:45 AM CEST, Wen Congyang wrote: > The new QMP command name is x-blockdev-change. It justs for > adding/removing quorum's child now, and don't support all kinds of > children, all kinds of operations, nor all block drivers. So it is > experimental now. I might have missed some discussion, why were the -add and -delete > +# @x-blockdev-change > +# > +# Dynamic reconfigure the block driver state graph. It can be used to > +# add, remove, insert, replace a block driver state. Currently only > +# the Quorum driver implements this feature to add and remove its child. > +# This is useful to fix a broken quorum child. > +# > +# @operation: the chanage operation. It can be add, delete. > +# > +# @parent: the id or node name of which node will be changed. > +# > +# @child: the child node-name which will be deleted. > +# > +# @node: the new node-name which will be added. > +# > +# Note: this command is experimental, and not a stable API. > +# > +# Since: 2.5 > +## > +{ 'command': 'x-blockdev-change', > + 'data' : { 'operation': 'ChangeOperation', > + 'parent': 'str', > + '*child': 'str', > + '*node': 'str' } } Do you really need two separate 'child' and 'node' parameters? If the operation is 'add' you can only use 'node', if it is 'delete, you can only use 'child'. It seems to me that you can simply have one 'node' parameter and use it for both ... Berto