diff options
author | Kevin Wolf <kwolf@redhat.com> | 2012-09-25 15:47:36 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-09-28 17:43:28 +0200 |
commit | 946d58be1533bf843b499df12e1d9f97b28245c8 (patch) | |
tree | 7765d932b1d3f008bf6e3202907183c66d5652ba /block-migration.c | |
parent | 6f8fd2530e9a530f237240daf1c981fa5df7f978 (diff) |
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>
Diffstat (limited to 'block-migration.c')
-rw-r--r-- | block-migration.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block-migration.c b/block-migration.c index 7def8ab197..ed933017f9 100644 --- a/block-migration.c +++ b/block-migration.c @@ -519,6 +519,8 @@ static void blk_mig_cleanup(void) BlkMigDevState *bmds; BlkMigBlock *blk; + bdrv_drain_all(); + set_dirty_tracking(0); while ((bmds = QSIMPLEQ_FIRST(&block_mig_state.bmds_list)) != NULL) { |