From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zbm2m-0000Xi-5o for qemu-devel@nongnu.org; Tue, 15 Sep 2015 04:56:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zbm2i-0002Ij-0Q for qemu-devel@nongnu.org; Tue, 15 Sep 2015 04:56:52 -0400 From: Alberto Garcia In-Reply-To: <20150914153700.GE3550@noname.str.redhat.com> References: <1441878905-5272-1-git-send-email-wency@cn.fujitsu.com> <1441878905-5272-5-git-send-email-wency@cn.fujitsu.com> <20150914153700.GE3550@noname.str.redhat.com> Date: Tue, 15 Sep 2015 10:56:44 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH v3 4/5] qmp: add monitor command to add/remove a child List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , Wen Congyang Cc: zhanghailiang , qemu block , Markus Armbruster , Jiang Yunhong , Dong Eddie , "Dr. David Alan Gilbert" , qemu devel , Gonglei , Stefan Hajnoczi , Yang Hongyang On Mon 14 Sep 2015 05:37:00 PM CEST, Kevin Wolf wrote: >> +{ 'command': 'x-child-add', >> + 'data' : { 'parent': 'str', 'child': 'str' } } > > This is probably not future-proof and only made for the special case > of quorum. Specifically, one thing I'm missing is some way to specfiy > what kind of child the new node is when a node can take different > types of children (e.g. bs->file and bs->backing_hd). Children here are specified by child roles, aren't they? We could have a ChildRole enum with 'file', 'format' and 'backing' that would be passed to this command and use the same enumeration in bdrv_open_image() rather than a pointer to BdrvChildRole. Berto