[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC V8 10/13] quorum: Add quorum_co_flush().
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [RFC V8 10/13] quorum: Add quorum_co_flush(). |
Date: |
Fri, 08 Feb 2013 13:23:47 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 |
Am 28.01.2013 18:07, schrieb BenoƮt Canet:
> Makes a vote to select error if any.
>
> Signed-off-by: Benoit Canet <address@hidden>
> ---
> block/quorum.c | 34 ++++++++++++++++++++++++++++++++++
> 1 file changed, 34 insertions(+)
>
> diff --git a/block/quorum.c b/block/quorum.c
> index 459434f..306a2df 100644
> --- a/block/quorum.c
> +++ b/block/quorum.c
> @@ -577,12 +577,46 @@ static int coroutine_fn
> quorum_co_is_allocated(BlockDriverState *bs,
> return result;
> }
>
> +static coroutine_fn int quorum_co_flush(BlockDriverState *bs)
> +{
> + BDRVQuorumState *s = bs->opaque;
> + QuorumVoteVersion *winner = NULL;
> + QuorumVotes error_votes;
> + QuorumVoteValue result_value;
> + int i;
> + int result = 0;
> + bool error = false;
> +
> + QLIST_INIT(&error_votes.vote_list);
> + error_votes.compare = quorum_long_compare;
> +
> + for (i = 0; i < s->total; i++) {
> + result = bdrv_co_flush(s->bs[i]);
> + if (result) {
> + error = true;
> + result_value.l = result;
You've got a negative result here, and result_value.l is unsigned. Sure
that this is a good idea?
Kevin
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [RFC V8 10/13] quorum: Add quorum_co_flush().,
Kevin Wolf <=