[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC V7 06/13] quorum: Add quorum mechanism.
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [RFC V7 06/13] quorum: Add quorum mechanism. |
Date: |
Mon, 28 Jan 2013 17:18:21 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, Jan 28, 2013 at 02:22:52PM +0100, Benoît Canet wrote:
> +static void quorum_vote(QuorumAIOCB *acb)
> +{
> + bool quorum = true;
> + int i, j, ret;
> + QuorumVoteValue hash;
> + BDRVQuorumState *s = acb->bqs;
> + QuorumVoteVersion *winner;
> +
> + /* get the index of the first successful read */
> + for (i = 0; i < s->total; i++) {
> + if (!acb->aios[i].ret) {
> + break;
> + }
> + }
> +
> + /* compare this read with all other successful read looking for quorum */
> + for (j = i + 1; j < s->total; j++) {
> + if (acb->aios[j].ret) {
> + continue;
> + }
> + quorum = quorum_compare(acb, &acb->qiovs[i], &acb->qiovs[j]);
> + if (!quorum) {
> + break;
> + }
4 space indentation
- Re: [Qemu-devel] [RFC V7 03/13] quorum: Add quorum_aio_writev and its dependencies., (continued)
- [Qemu-devel] [RFC V7 01/13] quorum: Create quorum .c, add QuorumSingleAIOCB and QuorumAIOCB., Benoît Canet, 2013/01/28
- [Qemu-devel] [RFC V7 02/13] quorum: Create BDRVQuorumState and BlkDriver and do init., Benoît Canet, 2013/01/28
- [Qemu-devel] [RFC V7 07/13] quorum: Add quorum_getlength()., Benoît Canet, 2013/01/28
- [Qemu-devel] [RFC V7 10/13] quorum: Add quorum_co_flush()., Benoît Canet, 2013/01/28
- [Qemu-devel] [RFC V7 12/13] quorum: Add quorum_snapshot_reopen., Benoît Canet, 2013/01/28
- [Qemu-devel] [RFC V7 13/13] quorum: Add quorum_open() and quorum_close()., Benoît Canet, 2013/01/28
- [Qemu-devel] [RFC V7 11/13] quorum: Add quorum_snapshot_img_create., Benoît Canet, 2013/01/28
- [Qemu-devel] [RFC V7 08/13] quorum: Add quorum_invalidate_cache()., Benoît Canet, 2013/01/28
- [Qemu-devel] [RFC V7 06/13] quorum: Add quorum mechanism., Benoît Canet, 2013/01/28
- Re: [Qemu-devel] [RFC V7 06/13] quorum: Add quorum mechanism.,
Stefan Hajnoczi <=
- [Qemu-devel] [RFC V7 05/13] quorum: Add quorum_aio_readv., Benoît Canet, 2013/01/28
- [Qemu-devel] [RFC V7 04/13] blkverify: Extract qemu_iovec_clone() and qemu_iovec_compare() from blkverify., Benoît Canet, 2013/01/28
- [Qemu-devel] [RFC V7 09/13] quorum: Add quorum_co_is_allocated., Benoît Canet, 2013/01/28