Skip to contentSkip to conversation

block-migration: Flush requests in blk_mig_cleanup

PATCH New Kevin Wolf 1 participant 1 message Sep 25, 2012

lore
Share & tools
lore

Kevin Wolf

author
#0 lore raw

PATCH 1/1 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.

---
 block-migration.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
block-migration.c +2 -0
index 7def8ab..ed93301 100644
@@ -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) {
Signature · 1 line
1.7.6.5