[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 15/19] migration/block: reset dirty bitmap before re
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 15/19] migration/block: reset dirty bitmap before reading |
Date: |
Mon, 5 Jun 2017 14:39:04 +0200 |
Any data that is returned by read may be stale already, the bitmap
has to be cleared before issuing the read.
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
migration/block.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/migration/block.c b/migration/block.c
index 9e9f0316be..8fe484e8b4 100644
--- a/migration/block.c
+++ b/migration/block.c
@@ -536,6 +536,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;
@@ -568,7 +570,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;
--
2.13.0
- Re: [Qemu-devel] [PATCH 16/19] block: protect modification of dirty bitmaps with a mutex, (continued)
- Re: [Qemu-devel] [PATCH 16/19] block: protect modification of dirty bitmaps with a mutex, Paolo Bonzini, 2017/06/27
- Re: [Qemu-devel] [PATCH 16/19] block: protect modification of dirty bitmaps with a mutex, Vladimir Sementsov-Ogievskiy, 2017/06/27
- Re: [Qemu-devel] [PATCH 16/19] block: protect modification of dirty bitmaps with a mutex, Paolo Bonzini, 2017/06/27
- Re: [Qemu-devel] [PATCH 16/19] block: protect modification of dirty bitmaps with a mutex, Vladimir Sementsov-Ogievskiy, 2017/06/27
- Re: [Qemu-devel] [PATCH 16/19] block: protect modification of dirty bitmaps with a mutex, Paolo Bonzini, 2017/06/27
- Re: [Qemu-devel] [PATCH 16/19] block: protect modification of dirty bitmaps with a mutex, Vladimir Sementsov-Ogievskiy, 2017/06/27
- Re: [Qemu-devel] [PATCH 16/19] block: protect modification of dirty bitmaps with a mutex, Paolo Bonzini, 2017/06/27
- Re: [Qemu-devel] [PATCH 16/19] block: protect modification of dirty bitmaps with a mutex, Vladimir Sementsov-Ogievskiy, 2017/06/27
- Re: [Qemu-devel] [PATCH 16/19] block: protect modification of dirty bitmaps with a mutex, Vladimir Sementsov-Ogievskiy, 2017/06/27
- Re: [Qemu-devel] [PATCH 16/19] block: protect modification of dirty bitmaps with a mutex, Paolo Bonzini, 2017/06/27
[Qemu-devel] [PATCH 15/19] migration/block: reset dirty bitmap before reading,
Paolo Bonzini <=
[Qemu-devel] [PATCH 18/19] block: split BlockAcctStats creation and setup, Paolo Bonzini, 2017/06/05
[Qemu-devel] [PATCH 19/19] block: make accounting thread-safe, Paolo Bonzini, 2017/06/05
Re: [Qemu-devel] [PATCH v4 00/19] Block layer thread safety, part 1, no-reply, 2017/06/05
Re: [Qemu-devel] [PATCH v4 00/19] Block layer thread safety, part 1, Fam Zheng, 2017/06/06