[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC V2 08/10] quorum: Add quorum_co_flush().
From: |
Benoît Canet |
Subject: |
[Qemu-devel] [RFC V2 08/10] quorum: Add quorum_co_flush(). |
Date: |
Tue, 7 Aug 2012 15:44:31 +0200 |
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 003fc3f..2df3ae6 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -245,6 +245,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;
+
+ for (i = 0; i <= 2; i++) {
+ ret = bdrv_co_flush(s->bs[i]);
+ if (ret < 0) {
+ return ret;
+ }
+ }
+
+ return ret;
+}
+
static BlockDriver bdrv_quorum = {
.format_name = "quorum",
.protocol_name = "quorum",
@@ -255,6 +270,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 V2 09/10] quorum: Add quorum_aio_readv., Benoît Canet, 2012/08/07
[Qemu-devel] [RFC V2 07/10] blkverify: Make blkverify_iovec_clone() and blkverify_iovec_compare() public, Benoît Canet, 2012/08/07
[Qemu-devel] [RFC V2 10/10] quorum: Add quorum mechanism., Benoît Canet, 2012/08/07