aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-10-15 11:55:53 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-10-15 11:55:54 +0100
commit32d9c5613e3cbb5d90daa3a1c629fb389e749d03 (patch)
tree9a93c3a76f7ef0832a1467a766e1ddb17ae87168 /block.c
parent88e6599669a2f8c9ec5b8baa62178bc3dfc340ae (diff)
parent5b0e9dd46fbda5152566a4a26fd96bc0d0452bf7 (diff)
Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20141015' into staging
migration/next for 20141015 # gpg: Signature made Wed 15 Oct 2014 09:21:54 BST using RSA key ID 5872D723 # gpg: Can't check signature: public key not found * remotes/juanquintela/tags/migration/20141015: migration: catch unknown flag combinations in ram_load qemu-file: Move stdio implementation to qemu-file-stdio.c qemu-file: Move unix and socket implementations to qemu-file-unix.c qemu-file: Use qemu_file_is_writable() on stdio_fclose() qemu-file: Make qemu_file_is_writable() non-static qemu-file: Add copyright header to qemu-file.c vmstate: Allow dynamic allocation for VBUFFER during migration block/migration: Disable cache invalidate for incoming migration Tests: QEMUSizedBuffer/QEMUBuffer QEMUSizedBuffer based QEMUFile Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block.c')
-rw-r--r--block.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/block.c b/block.c
index d3aebeb050..27533f3a81 100644
--- a/block.c
+++ b/block.c
@@ -5043,6 +5043,11 @@ void bdrv_invalidate_cache(BlockDriverState *bs, Error **errp)
return;
}
+ if (!(bs->open_flags & BDRV_O_INCOMING)) {
+ return;
+ }
+ bs->open_flags &= ~BDRV_O_INCOMING;
+
if (bs->drv->bdrv_invalidate_cache) {
bs->drv->bdrv_invalidate_cache(bs, &local_err);
} else if (bs->file) {
@@ -5078,19 +5083,6 @@ void bdrv_invalidate_cache_all(Error **errp)
}
}
-void bdrv_clear_incoming_migration_all(void)
-{
- BlockDriverState *bs;
-
- QTAILQ_FOREACH(bs, &bdrv_states, device_list) {
- AioContext *aio_context = bdrv_get_aio_context(bs);
-
- aio_context_acquire(aio_context);
- bs->open_flags = bs->open_flags & ~(BDRV_O_INCOMING);
- aio_context_release(aio_context);
- }
-}
-
int bdrv_flush(BlockDriverState *bs)
{
Coroutine *co;