@@ -15,6 +15,10 @@
#include "block_int.h"
+ssize_t blkverify_iovec_compare(QEMUIOVector *a, QEMUIOVector *b);
+void blkverify_iovec_clone(QEMUIOVector *dest, const QEMUIOVector *src,
+ void *buf);
+
typedef struct {
BlockDriverState * bs[3];
} BDRVQorumState;
@@ -244,6 +248,21 @@ static BlockDriverAIOCB *qorum_aio_writev(BlockDriverState *bs,
return &acb->common;
}
+static coroutine_fn int qorum_co_flush(BlockDriverState *bs)
+{
+ BDRVQorumState *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_qorum = {
.format_name = "qorum",
.protocol_name = "qorum",
@@ -254,6 +273,7 @@ static BlockDriver bdrv_qorum = {
.bdrv_file_open = qorum_open,
.bdrv_close = qorum_close,
+ .bdrv_co_flush_to_disk = qorum_co_flush,
.bdrv_aio_writev = qorum_aio_writev,
};
Signed-off-by: Benoit Canet <benoit@irqsave.net> --- block/qorum.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)