mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-14 21:52:18 -06:00
block-migration: Flush requests in blk_mig_cleanup
When cancelling block migration, all in-flight requests of the block migration must be completed before the data can be freed. This was visible as failing assertions and segfaults. Reported-by: Peter Lieven <pl@dlhnet.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
6f8fd2530e
commit
946d58be15
1 changed files with 2 additions and 0 deletions
|
@ -519,6 +519,8 @@ static void blk_mig_cleanup(void)
|
||||||
BlkMigDevState *bmds;
|
BlkMigDevState *bmds;
|
||||||
BlkMigBlock *blk;
|
BlkMigBlock *blk;
|
||||||
|
|
||||||
|
bdrv_drain_all();
|
||||||
|
|
||||||
set_dirty_tracking(0);
|
set_dirty_tracking(0);
|
||||||
|
|
||||||
while ((bmds = QSIMPLEQ_FIRST(&block_mig_state.bmds_list)) != NULL) {
|
while ((bmds = QSIMPLEQ_FIRST(&block_mig_state.bmds_list)) != NULL) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue