aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorBenoƮt Canet <benoit@irqsave.net>2014-02-21 22:21:17 +0100
committerKevin Wolf <kwolf@redhat.com>2014-02-21 22:29:50 +0100
commita28e4c408b28e4d55c5bd327a19290e1da3855dd (patch)
treeffe0ef0af1fb306fa19cc0749fc412b444dcf6f4 /block
parentd55dee2044791a02394a3db7055cedac68dca26b (diff)
downloadqemu-a28e4c408b28e4d55c5bd327a19290e1da3855dd.zip
qemu-a28e4c408b28e4d55c5bd327a19290e1da3855dd.tar.gz
qemu-a28e4c408b28e4d55c5bd327a19290e1da3855dd.tar.bz2
quorum: Add quorum_invalidate_cache().
We really want that live migration works with quorum so implement quorum_invalidate_cache(). Signed-off-by: Benoit Canet <benoit@irqsave.net> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/quorum.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/block/quorum.c b/block/quorum.c
index c6ea862..38bc217 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -619,6 +619,16 @@ static int64_t quorum_getlength(BlockDriverState *bs)
return result;
}
+static void quorum_invalidate_cache(BlockDriverState *bs)
+{
+ BDRVQuorumState *s = bs->opaque;
+ int i;
+
+ for (i = 0; i < s->num_children; i++) {
+ bdrv_invalidate_cache(s->bs[i]);
+ }
+}
+
static BlockDriver bdrv_quorum = {
.format_name = "quorum",
.protocol_name = "quorum",
@@ -629,6 +639,7 @@ static BlockDriver bdrv_quorum = {
.bdrv_aio_readv = quorum_aio_readv,
.bdrv_aio_writev = quorum_aio_writev,
+ .bdrv_invalidate_cache = quorum_invalidate_cache,
};
static void bdrv_quorum_init(void)