On 11/05/2015 09:49 PM, Alberto Garcia wrote: > On Fri 16 Oct 2015 10:57:45 AM CEST, Wen Congyang <we...@cn.fujitsu.com> > 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
This monitor command can be used to implement: add, delete, insert, remove, replace... Currently, I only implement add and delete operation. > >> +# @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 ... parent and child already exist in the BDS graph, and node is a new node. In the furture, we may need to implement insert opetioan, and this operation needs such three BDSes. Thanks Wen Congyang > > Berto > . >