qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 41/46] block: add a function to clear incoming live


From: Kevin Wolf
Subject: [Qemu-devel] [PATCH 41/46] block: add a function to clear incoming live migration flags
Date: Thu, 5 Apr 2012 17:52:19 +0200

From: BenoƮt Canet <address@hidden>

This function will clear all BDRV_O_INCOMING flags.

Signed-off-by: Benoit Canet <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
 block.c |    9 +++++++++
 block.h |    2 ++
 2 files changed, 11 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;
diff --git a/block.h b/block.h
index 5151dea..f163e54 100644
--- a/block.h
+++ b/block.h
@@ -229,6 +229,8 @@ BlockDriverAIOCB *bdrv_aio_ioctl(BlockDriverState *bs,
 void bdrv_invalidate_cache(BlockDriverState *bs);
 void bdrv_invalidate_cache_all(void);
 
+void bdrv_clear_incoming_migration_all(void);
+
 /* Ensure contents are flushed to disk.  */
 int bdrv_flush(BlockDriverState *bs);
 int coroutine_fn bdrv_co_flush(BlockDriverState *bs);
-- 
1.7.6.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]