]> Git Repo - qemu.git/commitdiff
migration/block: reset dirty bitmap before read in bulk phase
authorPeter Lieven <[email protected]>
Thu, 8 Mar 2018 11:18:25 +0000 (12:18 +0100)
committerDr. David Alan Gilbert <[email protected]>
Fri, 9 Mar 2018 17:39:25 +0000 (17:39 +0000)
Reset the dirty bitmap before reading to make sure we don't miss
any new data.

Cc: [email protected]
Signed-off-by: Peter Lieven <[email protected]>
Message-Id: <1520507908[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
migration/block.c

index 1f0394679750e11b799a556f7bbcf5d8cd46308b..87bb35ce63513de0632dfb169ede98fa82748623 100644 (file)
@@ -331,11 +331,10 @@ static int mig_save_device_bulk(QEMUFile *f, BlkMigDevState *bmds)
      */
     qemu_mutex_lock_iothread();
     aio_context_acquire(blk_get_aio_context(bmds->blk));
-    blk->aiocb = blk_aio_preadv(bb, cur_sector * BDRV_SECTOR_SIZE, &blk->qiov,
-                                0, blk_mig_read_cb, blk);
-
     bdrv_reset_dirty_bitmap(bmds->dirty_bitmap, cur_sector * BDRV_SECTOR_SIZE,
                             nr_sectors * BDRV_SECTOR_SIZE);
+    blk->aiocb = blk_aio_preadv(bb, cur_sector * BDRV_SECTOR_SIZE, &blk->qiov,
+                                0, blk_mig_read_cb, blk);
     aio_context_release(blk_get_aio_context(bmds->blk));
     qemu_mutex_unlock_iothread();
 
This page took 0.028563 seconds and 4 git commands to generate.