mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
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>
This commit is contained in:
parent
323920c4ea
commit
52e850dea9
2 changed files with 52 additions and 3 deletions
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
#define smp_wmb() barrier()
|
||||
#define smp_rmb() barrier()
|
||||
|
||||
/*
|
||||
* We use GCC builtin if it's available, as that can use
|
||||
* mfence on 32 bit as well, e.g. if built with -march=pentium-m.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue