]> git.proxmox.com Git - mirror_qemu.git/commit - block-migration.c
block-migration: add lock
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 22 Feb 2013 16:36:25 +0000 (17:36 +0100)
committerJuan Quintela <quintela@redhat.com>
Mon, 11 Mar 2013 12:32:01 +0000 (13:32 +0100)
commit52e850dea988585c3d693fd9cd4a4c38968d89b8
treee5fe8eb730492bdb8ca258f2be35f3e8a5dfad8b
parent323920c4eac01de74cf2b5e941c97ca9b2d36b7f
block-migration: add lock

Some state is shared between the block migration code and its AIO
callbacks.  Once block migration will run outside the iothread,
the block migration code and the AIO callbacks will be able to
run concurrently.  Protect the critical sections with a separate
lock.  Do the same for completed_sectors, which can be used from
the monitor.

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>
block-migration.c
include/qemu/atomic.h