diff options
Diffstat (limited to 'migration')
-rw-r--r-- | migration/block.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/migration/block.c b/migration/block.c index 9e20926..423877b 100644 --- a/migration/block.c +++ b/migration/block.c @@ -532,6 +532,8 @@ static int mig_save_device_dirty(QEMUFile *f, BlkMigDevState *bmds, } else { nr_sectors = BDRV_SECTORS_PER_DIRTY_CHUNK; } + bdrv_reset_dirty_bitmap(bmds->dirty_bitmap, sector, nr_sectors); + blk = g_new(BlkMigBlock, 1); blk->buf = g_malloc(BLOCK_SIZE); blk->bmds = bmds; @@ -564,7 +566,6 @@ static int mig_save_device_dirty(QEMUFile *f, BlkMigDevState *bmds, g_free(blk); } - bdrv_reset_dirty_bitmap(bmds->dirty_bitmap, sector, nr_sectors); sector += nr_sectors; bmds->cur_dirty = sector; |