aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorBenoƮt Canet <benoit.canet@gmail.com>2012-03-23 08:36:49 +0100
committerKevin Wolf <kwolf@redhat.com>2012-04-05 16:27:56 +0200
commit077892696b900ebf88052fef917367213db80477 (patch)
tree417007721e838e14c4a5cf32f6b6c1c5608b3247 /block.c
parentccb1f4a7b32fbebcf0d49beab1d2614f0a657d5a (diff)
downloadqemu-077892696b900ebf88052fef917367213db80477.zip
qemu-077892696b900ebf88052fef917367213db80477.tar.gz
qemu-077892696b900ebf88052fef917367213db80477.tar.bz2
block: add a function to clear incoming live migration flags
This function will clear all BDRV_O_INCOMING flags. Signed-off-by: Benoit Canet <benoit.canet@gmail.com> Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/block.c b/block.c
index b3117ef..c0c90f0 100644
--- a/block.c
+++ b/block.c
@@ -3624,6 +3624,15 @@ void bdrv_invalidate_cache_all(void)
}
}
+void bdrv_clear_incoming_migration_all(void)
+{
+ BlockDriverState *bs;
+
+ QTAILQ_FOREACH(bs, &bdrv_states, list) {
+ bs->open_flags = bs->open_flags & ~(BDRV_O_INCOMING);
+ }
+}
+
int bdrv_flush(BlockDriverState *bs)
{
Coroutine *co;