From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gaHDi-0008Mo-9y for qemu-devel@nongnu.org; Fri, 21 Dec 2018 04:35:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gaHDh-00074N-Gb for qemu-devel@nongnu.org; Fri, 21 Dec 2018 04:35:50 -0500 From: John Snow Date: Fri, 21 Dec 2018 04:35:20 -0500 Message-Id: <20181221093529.23855-3-jsnow@redhat.com> In-Reply-To: <20181221093529.23855-1-jsnow@redhat.com> References: <20181221093529.23855-1-jsnow@redhat.com> Subject: [Qemu-devel] [PATCH v6 02/11] block/dirty-bitmap: remove assertion from restore List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, qemu-block@nongnu.org Cc: eblake@redhat.com, Max Reitz , Fam Zheng , vsementsov@virtuozzo.com, John Snow , Kevin Wolf , Markus Armbruster 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 Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: John Snow --- block/dirty-bitmap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index 89fd1d7f8b..6b688394e4 100644 --- a/block/dirty-bitmap.c +++ b/block/dirty-bitmap.c @@ -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); -- 2.17.2