On Tue 22 Sep 2015 09:44:19 AM CEST, Wen Congyang <[email protected]> wrote:
> In some cases, we want to take a quorum child offline, and take
> another child online.
>
> Signed-off-by: Wen Congyang <[email protected]>
> Signed-off-by: zhanghailiang <[email protected]>
> Signed-off-by: Gonglei <[email protected]>
> Reviewed-by: Eric Blake <[email protected]>
> +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!
Berto