From nobody Fri Nov 7 03:36:04 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1545273152986102.18206491104615; Wed, 19 Dec 2018 18:32:32 -0800 (PST) Received: from localhost ([::1]:34997 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZo8V-0005ML-6F for importer@patchew.org; Wed, 19 Dec 2018 21:32:31 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZo6K-00048p-Vn for qemu-devel@nongnu.org; Wed, 19 Dec 2018 21:30:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZo6A-0007O0-VC for qemu-devel@nongnu.org; Wed, 19 Dec 2018 21:30:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34172) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gZo63-0007Bg-V3; Wed, 19 Dec 2018 21:30:00 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 81E2080470; Thu, 20 Dec 2018 02:29:58 +0000 (UTC) Received: from probe.bos.redhat.com (dhcp-17-232.bos.redhat.com [10.18.17.232]) by smtp.corp.redhat.com (Postfix) with ESMTP id 816D32D35F; Thu, 20 Dec 2018 02:29:57 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Wed, 19 Dec 2018 21:29:43 -0500 Message-Id: <20181220022952.20493-3-jsnow@redhat.com> In-Reply-To: <20181220022952.20493-1-jsnow@redhat.com> References: <20181220022952.20493-1-jsnow@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 20 Dec 2018 02:29:58 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v5 02/11] block/dirty-bitmap: remove assertion from restore X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Fam Zheng , vsementsov@virtuozzo.com, Markus Armbruster , Max Reitz , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" When making a backup of a dirty bitmap (for transactions), we want to restore that backup whether or not the bitmap is enabled or not. 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. Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- 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, H= Bitmap **out) void bdrv_restore_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap *backup) { HBitmap *tmp =3D bitmap->bitmap; - assert(bdrv_dirty_bitmap_enabled(bitmap)); assert(!bdrv_dirty_bitmap_readonly(bitmap)); bitmap->bitmap =3D backup; hbitmap_free(tmp); --=20 2.17.2