]> git.proxmox.com Git - mirror_qemu.git/commitdiff
block/dirty-bitmap: remove assertion from restore
authorJohn Snow <jsnow@redhat.com>
Fri, 21 Dec 2018 09:35:20 +0000 (04:35 -0500)
committerEric Blake <eblake@redhat.com>
Mon, 14 Jan 2019 16:09:46 +0000 (10:09 -0600)
When making a backup of a dirty bitmap (for transactions), we want to
restore that backup whether or not the bitmap is enabled.

It is perfectly valid to write into bitmaps that are disabled. It is
only illegitimate for the guest to have done so.

Remove this assertion.

Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20181221093529.23855-3-jsnow@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
block/dirty-bitmap.c

index 89fd1d7f8ba2f7db0b62e636be6b2b1c898d2837..6b688394e4e12291fd17be50448abb411166dd09 100644 (file)
@@ -625,7 +625,6 @@ void bdrv_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap **out)
 void bdrv_restore_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap *backup)
 {
     HBitmap *tmp = bitmap->bitmap;
-    assert(bdrv_dirty_bitmap_enabled(bitmap));
     assert(!bdrv_dirty_bitmap_readonly(bitmap));
     bitmap->bitmap = backup;
     hbitmap_free(tmp);