From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:55983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gxKr0-0000fp-3u for qemu-devel@nongnu.org; Fri, 22 Feb 2019 19:07:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gxKqx-0002Hy-Jy for qemu-devel@nongnu.org; Fri, 22 Feb 2019 19:07:41 -0500 From: John Snow Date: Fri, 22 Feb 2019 19:06:07 -0500 Message-Id: <20190223000614.13894-4-jsnow@redhat.com> In-Reply-To: <20190223000614.13894-1-jsnow@redhat.com> References: <20190223000614.13894-1-jsnow@redhat.com> Subject: [Qemu-devel] [PATCH v3 03/10] block/dirty-bitmap: remove set/reset assertions against enabled bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, qemu-block@nongnu.org Cc: Markus Armbruster , Kevin Wolf , vsementsov@virtuozzo.com, Juan Quintela , eblake@redhat.com, Max Reitz , libvir-list@redhat.com, "Dr. David Alan Gilbert" , John Snow , Stefan Hajnoczi , Fam Zheng bdrv_set_dirty_bitmap and bdrv_reset_dirty_bitmap are only used as an internal API by the mirror and migration areas of our code. These calls modify the bitmap, but do so at the behest of QEMU and not the guest. Presently, these bitmaps are always "enabled" anyway, but there's no reason they have to be. Modify these internal APIs to drop this assertion. Signed-off-by: John Snow --- block/dirty-bitmap.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index aa3f86bb73..9ea5738420 100644 --- a/block/dirty-bitmap.c +++ b/block/dirty-bitmap.c @@ -542,7 +542,6 @@ int64_t bdrv_dirty_iter_next(BdrvDirtyBitmapIter *iter) void bdrv_set_dirty_bitmap_locked(BdrvDirtyBitmap *bitmap, int64_t offset, int64_t bytes) { - assert(bdrv_dirty_bitmap_enabled(bitmap)); assert(!bdrv_dirty_bitmap_readonly(bitmap)); hbitmap_set(bitmap->bitmap, offset, bytes); } @@ -559,7 +558,6 @@ void bdrv_set_dirty_bitmap(BdrvDirtyBitmap *bitmap, void bdrv_reset_dirty_bitmap_locked(BdrvDirtyBitmap *bitmap, int64_t offset, int64_t bytes) { - assert(bdrv_dirty_bitmap_enabled(bitmap)); assert(!bdrv_dirty_bitmap_readonly(bitmap)); hbitmap_reset(bitmap->bitmap, offset, bytes); } -- 2.17.2