Commit 07789269 authored by Benoît Canet's avatar Benoît Canet Committed by Kevin Wolf
Browse files

block: add a function to clear incoming live migration flags



This function will clear all BDRV_O_INCOMING flags.
Signed-off-by: default avatarBenoit Canet <benoit.canet@gmail.com>
Reviewed-by: default avatarStefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent ccb1f4a7
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment