diff options
author | BenoƮt Canet <benoit@irqsave.net> | 2014-02-21 22:21:17 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-02-21 22:29:50 +0100 |
commit | a28e4c408b28e4d55c5bd327a19290e1da3855dd (patch) | |
tree | ffe0ef0af1fb306fa19cc0749fc412b444dcf6f4 /block/quorum.c | |
parent | d55dee2044791a02394a3db7055cedac68dca26b (diff) |
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/quorum.c')
-rw-r--r-- | block/quorum.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/block/quorum.c b/block/quorum.c index c6ea862132..38bc2176e1 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) |