[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v5 1/4] Add new block driver interface to add/de
From: |
Wen Congyang |
Subject: |
Re: [Qemu-block] [PATCH v5 1/4] Add new block driver interface to add/delete a BDS's child |
Date: |
Thu, 8 Oct 2015 10:05:11 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
On 10/07/2015 09:35 PM, Alberto Garcia wrote:
> On Tue 22 Sep 2015 09:44:19 AM CEST, Wen Congyang <address@hidden> wrote:
>> In some cases, we want to take a quorum child offline, and take
>> another child online.
>>
>> Signed-off-by: Wen Congyang <address@hidden>
>> Signed-off-by: zhanghailiang <address@hidden>
>> Signed-off-by: Gonglei <address@hidden>
>> Reviewed-by: Eric Blake <address@hidden>
>
>> +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
> .
>