From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39777) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zk0aQ-0002lx-Oz for qemu-devel@nongnu.org; Wed, 07 Oct 2015 22:05:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zk0aP-0006fW-KG for qemu-devel@nongnu.org; Wed, 07 Oct 2015 22:05:38 -0400 References: <1442907862-21376-1-git-send-email-wency@cn.fujitsu.com> <1442907862-21376-2-git-send-email-wency@cn.fujitsu.com> From: Wen Congyang Message-ID: <5615CF57.5050309@cn.fujitsu.com> Date: Thu, 8 Oct 2015 10:05:11 +0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 1/4] Add new block driver interface to add/delete a BDS's child List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , qemu devel , Eric Blake , Markus Armbruster , Stefan Hajnoczi Cc: Kevin Wolf , zhanghailiang , qemu block , Jiang Yunhong , Dong Eddie , "Dr. David Alan Gilbert" , Gonglei , Yang Hongyang On 10/07/2015 09:35 PM, Alberto Garcia wrote: > On Tue 22 Sep 2015 09:44:19 AM CEST, Wen Congyang wrote: >> In some cases, we want to take a quorum child offline, and take >> another child online. >> >> Signed-off-by: Wen Congyang >> Signed-off-by: zhanghailiang >> Signed-off-by: Gonglei >> Reviewed-by: Eric Blake > >> +void bdrv_add_child(BlockDriverState *parent_bs, BlockDriverState *child_bs, >> + Error **errp) >> +{ >> + >> + if (!parent_bs->drv || !parent_bs->drv->bdrv_add_child) { >> + error_setg(errp, "The BDS %s doesn't support adding a child", >> + bdrv_get_device_or_node_name(parent_bs)); >> + return; >> + } >> + >> + if (!QLIST_EMPTY(&child_bs->parents)) { >> + error_setg(errp, "The BDS %s already has parent", >> + child_bs->node_name); > > I think there's one 'a' missing: > > "The BDS %s already has a parent". > > I also don't think we should use "BDS" in error messages, that's an > acronym for the name of a C data type, not something that the user is > supposed to know about. > > I suggest using 'Node' instead. > > Otherwise the patch looks good to me, thanks! OK, I will fix it in the next version Thanks Wen Congyang > > Berto > . >