Signed-off-by: Benoit Canet <ben...@irqsave.net> --- 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