[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC V3 7/9] quorum: Add quorum_co_flush().
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] [RFC V3 7/9] quorum: Add quorum_co_flush(). |
Date: |
Tue, 14 Aug 2012 18:52:41 +0000 |
On Tue, Aug 14, 2012 at 2:14 PM, Benoît Canet <address@hidden> wrote:
> Signed-off-by: Benoit Canet <address@hidden>
> ---
> block/quorum.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/block/quorum.c b/block/quorum.c
> index 0a6647f..86962b4 100644
> --- a/block/quorum.c
> +++ b/block/quorum.c
> @@ -279,6 +279,21 @@ static BlockDriverAIOCB
> *quorum_aio_writev(BlockDriverState *bs,
> return &acb->common;
> }
>
> +static coroutine_fn int quorum_co_flush(BlockDriverState *bs)
> +{
> + BDRVQuorumState *s = bs->opaque;
> + int i, ret = 0;
> +
> + for (i = 0; i < s->m; i++) {
> + ret = bdrv_co_flush(s->bs[i]);
> + if (ret < 0) {
> + return ret;
This stops flushing if any of the replicates fail. Shouldn't we just
ignore error?
> + }
> + }
> +
> + return ret;
> +}
> +
> static BlockDriver bdrv_quorum = {
> .format_name = "quorum",
> .protocol_name = "quorum",
> @@ -289,6 +304,7 @@ static BlockDriver bdrv_quorum = {
>
> .bdrv_file_open = quorum_open,
> .bdrv_close = quorum_close,
> + .bdrv_co_flush_to_disk = quorum_co_flush,
>
> .bdrv_aio_writev = quorum_aio_writev,
> };
> --
> 1.7.9.5
>
- [Qemu-devel] [RFC V3 1/9] quorum: Create quorum .c, add QuorumSingleAIOCB and QuorumAIOCB., (continued)
- [Qemu-devel] [RFC V3 1/9] quorum: Create quorum .c, add QuorumSingleAIOCB and QuorumAIOCB., Benoît Canet, 2012/08/14
- [Qemu-devel] [RFC V3 3/9] quorum: Add quorum_open() and quorum_close()., Benoît Canet, 2012/08/14
- [Qemu-devel] [RFC V3 5/9] quorum: Add quorum_aio_writev and its dependencies., Benoît Canet, 2012/08/14
- [Qemu-devel] [RFC V3 6/9] blkverify: Extract qemu_iovec_clone() and qemu_iovec_compare() from blkverify., Benoît Canet, 2012/08/14
- [Qemu-devel] [RFC V3 2/9] quorum: Create BDRVQuorumState and BlkDriver and do init., Benoît Canet, 2012/08/14
- [Qemu-devel] [RFC V3 4/9] quorum: Add quorum_getlength()., Benoît Canet, 2012/08/14
- [Qemu-devel] [RFC V3 7/9] quorum: Add quorum_co_flush()., Benoît Canet, 2012/08/14
- Re: [Qemu-devel] [RFC V3 7/9] quorum: Add quorum_co_flush().,
Blue Swirl <=
- [Qemu-devel] [RFC V3 9/9] quorum: Add quorum mechanism., Benoît Canet, 2012/08/14
- [Qemu-devel] [RFC V3 8/9] quorum: Add quorum_aio_readv., Benoît Canet, 2012/08/14
- Re: [Qemu-devel] [RFC V3 0/9] Quorum disk image corruption resiliency, Blue Swirl, 2012/08/14
- Re: [Qemu-devel] [RFC V3 0/9] Quorum disk image corruption resiliency, Stefan Hajnoczi, 2012/08/15
- Re: [Qemu-devel] [RFC V3 0/9] Quorum disk image corruption resiliency, Benoît Canet, 2012/08/20