From: BenoƮt Canet Date: Fri, 23 Mar 2012 07:36:49 +0000 (+0100) Subject: block: add a function to clear incoming live migration flags X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~1405^2~17^2~628^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=077892696b900ebf88052fef917367213db80477;p=sdk%2Femulator%2Fqemu.git block: add a function to clear incoming live migration flags This function will clear all BDRV_O_INCOMING flags. Signed-off-by: Benoit Canet Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- diff --git a/block.c b/block.c index b3117ef3f1..c0c90f061b 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 5151deab48..f163e54b5f 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);