aboutsummaryrefslogtreecommitdiff
path: root/block-migration.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-02-22 17:36:28 +0100
committerJuan Quintela <quintela@redhat.com>2013-03-11 13:32:01 +0100
commit9b0950375277467fd74a9075624477ae43b9bb22 (patch)
tree32a7a3d94d8db23346accf8db5803a2bb508f020 /block-migration.c
parent32c835ba3984728c22d4e73cdb595090a60f437e (diff)
downloadqemu-arm-9b0950375277467fd74a9075624477ae43b9bb22.tar.gz
migration: run setup callbacks out of big lock
Only the migration_bitmap_sync() call needs the iothread lock. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'block-migration.c')
-rw-r--r--block-migration.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block-migration.c b/block-migration.c
index 8da5f868af..2fd7699794 100644
--- a/block-migration.c
+++ b/block-migration.c
@@ -583,10 +583,12 @@ static int block_save_setup(QEMUFile *f, void *opaque)
DPRINTF("Enter save live setup submitted %d transferred %d\n",
block_mig_state.submitted, block_mig_state.transferred);
+ qemu_mutex_lock_iothread();
init_blk_migration(f);
/* start track dirty blocks */
set_dirty_tracking(1);
+ qemu_mutex_unlock_iothread();
ret = flush_blks(f);
blk_mig_reset_dirty_cursor();