qemu-block
[Top][All Lists]
Advanced

[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: Alberto Garcia
Subject: Re: [Qemu-block] [PATCH v5 1/4] Add new block driver interface to add/delete a BDS's child
Date: Wed, 07 Oct 2015 15:35:32 +0200
User-agent: Notmuch/0.13.2 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu)

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!

Berto



reply via email to

[Prev in Thread] Current Thread [Next in Thread]