From nobody Sun Nov 9 11:35:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.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 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1550687054794543.378142111738; Wed, 20 Feb 2019 10:24:14 -0800 (PST) Received: from localhost ([127.0.0.1]:45329 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwWXT-0008Ke-Ow for importer@patchew.org; Wed, 20 Feb 2019 13:24:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwWBX-00089y-TO for qemu-devel@nongnu.org; Wed, 20 Feb 2019 13:01:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwWBN-0004b1-Nd for qemu-devel@nongnu.org; Wed, 20 Feb 2019 13:01:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40370) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwWBK-0004Z8-F3 for qemu-devel@nongnu.org; Wed, 20 Feb 2019 13:01:19 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DEAC51FCFDB; Wed, 20 Feb 2019 18:01:16 +0000 (UTC) Received: from probe.bos.redhat.com (dhcp-17-92.bos.redhat.com [10.18.17.92]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5420C18B96; Wed, 20 Feb 2019 18:01:16 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 13:01:10 -0500 Message-Id: <20190220180112.28250-2-jsnow@redhat.com> In-Reply-To: <20190220180112.28250-1-jsnow@redhat.com> References: <20190220180112.28250-1-jsnow@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 20 Feb 2019 18:01:16 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL v2 1/3] dirty-bitmap: Expose persistent flag to 'query-block' 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: peter.maydell@linaro.org, jsnow@redhat.com 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" From: Eric Blake Since qemu currently doesn't flush persistent bitmaps to disk until shutdown (which might be MUCH later), it's useful if 'query-block' at least shows WHICH bitmaps will (eventually) make it to persistent storage. Update affected iotests. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Message-id: 20190204210512.27458-1-eblake@redhat.com Signed-off-by: John Snow --- block/dirty-bitmap.c | 1 + qapi/block-core.json | 5 ++++- tests/qemu-iotests/124 | 1 + tests/qemu-iotests/236.out | 14 ++++++++++++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index 00ea36f554..e46f72b346 100644 --- a/block/dirty-bitmap.c +++ b/block/dirty-bitmap.c @@ -440,6 +440,7 @@ BlockDirtyInfoList *bdrv_query_dirty_bitmaps(BlockDrive= rState *bs) info->has_name =3D !!bm->name; info->name =3D g_strdup(bm->name); info->status =3D bdrv_dirty_bitmap_status(bm); + info->persistent =3D bm->persistent; entry->value =3D info; *plist =3D entry; plist =3D &entry->next; diff --git a/qapi/block-core.json b/qapi/block-core.json index ee1ab7a8a2..b8c8e04d02 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -450,11 +450,14 @@ # # @status: current status of the dirty bitmap (since 2.4) # +# @persistent: true if the bitmap will eventually be flushed to persistent +# storage (since 4.0) +# # Since: 1.3 ## { 'struct': 'BlockDirtyInfo', 'data': {'*name': 'str', 'count': 'int', 'granularity': 'uint32', - 'status': 'DirtyBitmapStatus'} } + 'status': 'DirtyBitmapStatus', 'persistent': 'bool' } } =20 ## # @Qcow2BitmapInfoFlags: diff --git a/tests/qemu-iotests/124 b/tests/qemu-iotests/124 index 9f189e3b54..5aa1bf1bd6 100755 --- a/tests/qemu-iotests/124 +++ b/tests/qemu-iotests/124 @@ -350,6 +350,7 @@ class TestIncrementalBackup(TestIncrementalBackupBase): self.assert_qmp(result, 'return[0]/dirty-bitmaps[0]/count', 458752) self.assert_qmp(result, 'return[0]/dirty-bitmaps[0]/granularity', = 65536) self.assert_qmp(result, 'return[0]/dirty-bitmaps[0]/status', 'acti= ve') + self.assert_qmp(result, 'return[0]/dirty-bitmaps[0]/persistent', F= alse) =20 # Prepare a cluster_size=3D128k backup target without a backing fi= le. (target, _) =3D bitmap0.new_target() diff --git a/tests/qemu-iotests/236.out b/tests/qemu-iotests/236.out index bb2d71ea5e..5006f7bca1 100644 --- a/tests/qemu-iotests/236.out +++ b/tests/qemu-iotests/236.out @@ -25,12 +25,14 @@ write -P0xcd 0x3ff0000 64k "count": 262144, "granularity": 65536, "name": "bitmapB", + "persistent": false, "status": "active" }, { "count": 262144, "granularity": 65536, "name": "bitmapA", + "persistent": false, "status": "active" } ] @@ -85,12 +87,14 @@ write -P0xcd 0x3ff0000 64k "count": 262144, "granularity": 65536, "name": "bitmapB", + "persistent": false, "status": "active" }, { "count": 262144, "granularity": 65536, "name": "bitmapA", + "persistent": false, "status": "active" } ] @@ -183,18 +187,21 @@ write -P0xea 0x3fe0000 64k "count": 393216, "granularity": 65536, "name": "bitmapC", + "persistent": false, "status": "disabled" }, { "count": 262144, "granularity": 65536, "name": "bitmapB", + "persistent": false, "status": "disabled" }, { "count": 458752, "granularity": 65536, "name": "bitmapA", + "persistent": false, "status": "disabled" } ] @@ -247,18 +254,21 @@ write -P0xea 0x3fe0000 64k "count": 393216, "granularity": 65536, "name": "bitmapC", + "persistent": false, "status": "disabled" }, { "count": 262144, "granularity": 65536, "name": "bitmapB", + "persistent": false, "status": "disabled" }, { "count": 458752, "granularity": 65536, "name": "bitmapA", + "persistent": false, "status": "disabled" } ] @@ -304,24 +314,28 @@ write -P0xea 0x3fe0000 64k "count": 458752, "granularity": 65536, "name": "bitmapD", + "persistent": false, "status": "disabled" }, { "count": 393216, "granularity": 65536, "name": "bitmapC", + "persistent": false, "status": "disabled" }, { "count": 262144, "granularity": 65536, "name": "bitmapB", + "persistent": false, "status": "disabled" }, { "count": 458752, "granularity": 65536, "name": "bitmapA", + "persistent": false, "status": "disabled" } ] --=20 2.17.2 From nobody Sun Nov 9 11:35:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.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 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1550686562695545.2151633478842; Wed, 20 Feb 2019 10:16:02 -0800 (PST) Received: from localhost ([127.0.0.1]:45207 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwWPT-0002PL-Jp for importer@patchew.org; Wed, 20 Feb 2019 13:15:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwWBX-00089w-TG for qemu-devel@nongnu.org; Wed, 20 Feb 2019 13:01:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwWBN-0004at-KZ for qemu-devel@nongnu.org; Wed, 20 Feb 2019 13:01:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34604) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwWBK-0004ZI-Gf for qemu-devel@nongnu.org; Wed, 20 Feb 2019 13:01:19 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7F72AC0C8BBF; Wed, 20 Feb 2019 18:01:17 +0000 (UTC) Received: from probe.bos.redhat.com (dhcp-17-92.bos.redhat.com [10.18.17.92]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0806818BBE; Wed, 20 Feb 2019 18:01:16 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 13:01:11 -0500 Message-Id: <20190220180112.28250-3-jsnow@redhat.com> In-Reply-To: <20190220180112.28250-1-jsnow@redhat.com> References: <20190220180112.28250-1-jsnow@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 20 Feb 2019 18:01:17 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL v2 2/3] block/dirty-bitmap: Documentation and Comment fixups 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: peter.maydell@linaro.org, jsnow@redhat.com 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" The meaning of the states has changed subtly over time, this should bring the understanding more in-line with the current, actual usages. Reported-by: Eric Blake Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-id: 20190202011048.12343-1-jsnow@redhat.com Signed-off-by: John Snow --- block/dirty-bitmap.c | 20 ++++++++++++++------ qapi/block-core.json | 32 ++++++++++++++++++++++++-------- 2 files changed, 38 insertions(+), 14 deletions(-) diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index e46f72b346..c6d4acebfa 100644 --- a/block/dirty-bitmap.c +++ b/block/dirty-bitmap.c @@ -29,12 +29,20 @@ #include "block/blockjob.h" =20 /** - * A BdrvDirtyBitmap can be in three possible states: - * (1) successor is NULL and disabled is false: full r/w mode - * (2) successor is NULL and disabled is true: read only mode ("disabled") - * (3) successor is set: frozen mode. - * A frozen bitmap cannot be renamed, deleted, anonymized, cleared, se= t, - * or enabled. A frozen bitmap can only abdicate() or reclaim(). + * A BdrvDirtyBitmap can be in four possible user-visible states: + * (1) Active: successor is NULL, and disabled is false: full r/w mode + * (2) Disabled: successor is NULL, and disabled is true: qualified r/w mo= de, + * guest writes are dropped, but monitor writes are possible, + * through commands like merge and clear. + * (3) Frozen: successor is not NULL. + * A frozen bitmap cannot be renamed, deleted, cleared, set, + * enabled, merged to, etc. A frozen bitmap can only abdicat= e() + * or reclaim(). + * In this state, the anonymous successor bitmap may be eith= er + * Active and recording writes from the guest (e.g. backup j= obs), + * but it can be Disabled and not recording writes. + * (4) Locked: Whether Active or Disabled, the user cannot modify this b= itmap + * in any way from the monitor. */ struct BdrvDirtyBitmap { QemuMutex *mutex; diff --git a/qapi/block-core.json b/qapi/block-core.json index b8c8e04d02..2b8afbb924 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -420,17 +420,27 @@ # # An enumeration of possible states that a dirty bitmap can report to the = user. # -# @frozen: The bitmap is currently in-use by a backup operation or block j= ob, -# and is immutable. +# @frozen: The bitmap is currently in-use by some operation and is immutab= le. +# If the bitmap was @active prior to the operation, new writes by= the +# guest are being recorded in a temporary buffer, and will not be= lost. +# Generally, bitmaps are cleared on successful use in an operatio= n and +# the temporary buffer is committed into the bitmap. On failure, = the +# temporary buffer is merged back into the bitmap without first +# clearing it. +# Please refer to the documentation for each bitmap-using operati= on, +# See also @blockdev-backup, @drive-backup. # -# @disabled: The bitmap is currently in-use by an internal operation and is -# read-only. It can still be deleted. +# @disabled: The bitmap is not currently recording new writes by the guest. +# This is requested explicitly via @block-dirty-bitmap-disable. +# It can still be cleared, deleted, or used for backup operatio= ns. # # @active: The bitmap is actively monitoring for new writes, and can be cl= eared, # deleted, or used for backup operations. # -# @locked: The bitmap is currently in-use by some operation and can not be -# cleared, deleted, or used for backup operations. (Since 2.12) +# @locked: The bitmap is currently in-use by some operation and is immutab= le. +# If the bitmap was @active prior to the operation, it is still +# recording new writes. If the bitmap was @disabled, it is not +# recording new writes. (Since 2.12) # # Since: 2.4 ## @@ -2094,9 +2104,15 @@ # @block-dirty-bitmap-merge: # # Merge dirty bitmaps listed in @bitmaps to the @target dirty bitmap. -# The @bitmaps dirty bitmaps are unchanged. +# Dirty bitmaps in @bitmaps will be unchanged, except if it also appears +# as the @target bitmap. Any bits already set in @target will still be +# set after the merge, i.e., this operation does not clear the target. # On error, @target is unchanged. # +# The resulting bitmap will count as dirty any clusters that were dirty in= any +# of the source bitmaps. This can be used to achieve backup checkpoints, o= r in +# simpler usages, to copy bitmaps. +# # Returns: nothing on success # If @node is not a valid block device, DeviceNotFound # If any bitmap in @bitmaps or @target is not found, GenericError @@ -2131,7 +2147,7 @@ ## # @x-debug-block-dirty-bitmap-sha256: # -# Get bitmap SHA256 +# Get bitmap SHA256. # # Returns: BlockDirtyBitmapSha256 on success # If @node is not a valid block device, DeviceNotFound --=20 2.17.2 From nobody Sun Nov 9 11:35:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.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 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1550686018006511.532241888739; Wed, 20 Feb 2019 10:06:58 -0800 (PST) Received: from localhost ([127.0.0.1]:45016 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwWGj-0003RN-Ty for importer@patchew.org; Wed, 20 Feb 2019 13:06:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwWBX-00089z-Tt for qemu-devel@nongnu.org; Wed, 20 Feb 2019 13:01:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwWBN-0004bC-Ti for qemu-devel@nongnu.org; Wed, 20 Feb 2019 13:01:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:28670) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwWBL-0004ZW-OY for qemu-devel@nongnu.org; Wed, 20 Feb 2019 13:01:20 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 18843DF14A; Wed, 20 Feb 2019 18:01:18 +0000 (UTC) Received: from probe.bos.redhat.com (dhcp-17-92.bos.redhat.com [10.18.17.92]) by smtp.corp.redhat.com (Postfix) with ESMTP id 98B0C18B85; Wed, 20 Feb 2019 18:01:17 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 13:01:12 -0500 Message-Id: <20190220180112.28250-4-jsnow@redhat.com> In-Reply-To: <20190220180112.28250-1-jsnow@redhat.com> References: <20190220180112.28250-1-jsnow@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 20 Feb 2019 18:01:18 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL v2 3/3] blockdev: acquire aio_context for bitmap add/remove 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: peter.maydell@linaro.org, jsnow@redhat.com 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 bitmaps are persistent, they may incur a disk read or write when bitma= ps are added or removed. For configurations like virtio-dataplane, failing to acquire this lock will abort QEMU when disk IO occurs. We used to acquire aio_context as part of the bitmap lookup, so re-introduce the lock for just the cases that have an IO penalty. Commit 2119882c removed these locks, and I failed to notice this when we committed fd5ae4cc, so this has been broken since persistent bitmaps were introduced. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=3D1672010 Reported-By: Aihua Liang Signed-off-by: John Snow Reviewed-by: Eric Blake Message-id: 20190218233154.19303-1-jsnow@redhat.com Signed-off-by: John Snow --- blockdev.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/blockdev.c b/blockdev.c index fb18e9c975..8714ad2702 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2820,6 +2820,7 @@ void qmp_block_dirty_bitmap_add(const char *node, con= st char *name, { BlockDriverState *bs; BdrvDirtyBitmap *bitmap; + AioContext *aio_context =3D NULL; =20 if (!name || name[0] =3D=3D '\0') { error_setg(errp, "Bitmap name cannot be empty"); @@ -2854,15 +2855,17 @@ void qmp_block_dirty_bitmap_add(const char *node, c= onst char *name, disabled =3D false; } =20 - if (persistent && - !bdrv_can_store_new_dirty_bitmap(bs, name, granularity, errp)) - { - return; + if (persistent) { + aio_context =3D bdrv_get_aio_context(bs); + aio_context_acquire(aio_context); + if (!bdrv_can_store_new_dirty_bitmap(bs, name, granularity, errp))= { + goto out; + } } =20 bitmap =3D bdrv_create_dirty_bitmap(bs, granularity, name, errp); if (bitmap =3D=3D NULL) { - return; + goto out; } =20 if (disabled) { @@ -2870,6 +2873,10 @@ void qmp_block_dirty_bitmap_add(const char *node, co= nst char *name, } =20 bdrv_dirty_bitmap_set_persistance(bitmap, persistent); + out: + if (aio_context) { + aio_context_release(aio_context); + } } =20 void qmp_block_dirty_bitmap_remove(const char *node, const char *name, @@ -2878,6 +2885,7 @@ void qmp_block_dirty_bitmap_remove(const char *node, = const char *name, BlockDriverState *bs; BdrvDirtyBitmap *bitmap; Error *local_err =3D NULL; + AioContext *aio_context =3D NULL; =20 bitmap =3D block_dirty_bitmap_lookup(node, name, &bs, errp); if (!bitmap || !bs) { @@ -2892,14 +2900,20 @@ void qmp_block_dirty_bitmap_remove(const char *node= , const char *name, } =20 if (bdrv_dirty_bitmap_get_persistance(bitmap)) { + aio_context =3D bdrv_get_aio_context(bs); + aio_context_acquire(aio_context); bdrv_remove_persistent_dirty_bitmap(bs, name, &local_err); if (local_err !=3D NULL) { error_propagate(errp, local_err); - return; + goto out; } } =20 bdrv_release_dirty_bitmap(bs, bitmap); + out: + if (aio_context) { + aio_context_release(aio_context); + } } =20 /** --=20 2.17.2