qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-block] [PATCH v3 07/38] block/quorum: Implement b


From: Alberto Garcia
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v3 07/38] block/quorum: Implement bdrv_is_inserted()
Date: Thu, 04 Jun 2015 14:37:29 +0200
User-agent: Notmuch/0.13.2 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu)

On Wed 03 Jun 2015 09:43:48 PM CEST, Max Reitz wrote:
> bdrv_is_inserted() should be invoked recursively on the children of
> quorum.
>
> Signed-off-by: Max Reitz <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> ---

> +static bool quorum_is_inserted(BlockDriverState *bs)
> +{
> +    BDRVQuorumState *s = bs->opaque;
> +    int i;
> +
> +    for (i = 0; i < s->num_children; i++) {
> +        if (!bdrv_is_inserted(s->bs[i])) {
> +            return false;
> +        }
> +    }
> +
> +    return true;
> +}
> +

I wonder if it can actually happen that only some of the BDS are
inserted :-?

Berto



reply via email to

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