mirror of
https://github.com/mii443/qemu.git
synced 2025-08-23 15:48:20 +00:00
migration/block-dirty-bitmap: fix dirty_bitmap_mig_before_vm_start
Using the _locked version of bdrv_enable_dirty_bitmap to bypass locking
is wrong as we do not already own the mutex. Moreover, the adjacent
call to bdrv_dirty_bitmap_enable_successor grabs the mutex.
Fixes: 58f72b965e9e1q
Cc: qemu-stable@nongnu.org # v3.0
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200727194236.19551-8-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit e6ce5e9224
)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
This commit is contained in:
committed by
Michael Roth
parent
b52a91816e
commit
08550a9940
@ -498,7 +498,7 @@ void dirty_bitmap_mig_before_vm_start(void)
|
|||||||
DirtyBitmapLoadBitmapState *b = item->data;
|
DirtyBitmapLoadBitmapState *b = item->data;
|
||||||
|
|
||||||
if (b->migrated) {
|
if (b->migrated) {
|
||||||
bdrv_enable_dirty_bitmap_locked(b->bitmap);
|
bdrv_enable_dirty_bitmap(b->bitmap);
|
||||||
} else {
|
} else {
|
||||||
bdrv_dirty_bitmap_enable_successor(b->bitmap);
|
bdrv_dirty_bitmap_enable_successor(b->bitmap);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user