From nobody Tue Feb 10 15:28:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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 (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 158202112889255.97462238432183; Tue, 18 Feb 2020 02:18:48 -0800 (PST) Received: from localhost ([::1]:60056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3zxn-0008Ph-Q2 for importer@patchew.org; Tue, 18 Feb 2020 05:18:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48870) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3zv7-0002xx-KW for qemu-devel@nongnu.org; Tue, 18 Feb 2020 05:16:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j3zv6-0007tZ-Kk for qemu-devel@nongnu.org; Tue, 18 Feb 2020 05:16:01 -0500 Received: from proxmox-new.maurer-it.com ([212.186.127.180]:25357) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j3zv3-0007qM-98; Tue, 18 Feb 2020 05:15:57 -0500 Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 486FA41CAA; Tue, 18 Feb 2020 11:08:09 +0100 (CET) From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= To: qemu-devel@nongnu.org Subject: [RFC qemu 4/6] mirror: switch to bdrv_dirty_bitmap_merge_internal Date: Tue, 18 Feb 2020 11:07:38 +0100 Message-Id: <20200218100740.2228521-5-f.gruenbichler@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200218100740.2228521-1-f.gruenbichler@proxmox.com> References: <20200218100740.2228521-1-f.gruenbichler@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.186.127.180 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-block@nongnu.org, John Snow , Markus Armbruster , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" since sync_bitmap is busy at the point of merging, and we checked access beforehand. Signed-off-by: Fabian Gr=C3=BCnbichler --- block/mirror.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index 40d174a625..d6aca2874e 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -735,8 +735,8 @@ static int mirror_exit_common(Job *job) job->ret =3D=3D 0 && ret =3D=3D 0)) { /* Success; synchronize copy back to sync. */ bdrv_clear_dirty_bitmap(s->sync_bitmap, NULL); - bdrv_merge_dirty_bitmap(s->sync_bitmap, s->dirty_bitmap, - NULL, &error_abort); + bdrv_dirty_bitmap_merge_internal(s->sync_bitmap, s->dirty_bitm= ap, + NULL, true); } } bdrv_release_dirty_bitmap(s->dirty_bitmap); @@ -1727,8 +1727,8 @@ static BlockJob *mirror_start_job( } =20 if (s->sync_mode =3D=3D MIRROR_SYNC_MODE_BITMAP) { - bdrv_merge_dirty_bitmap(s->dirty_bitmap, s->sync_bitmap, - NULL, &local_err); + bdrv_dirty_bitmap_merge_internal(s->dirty_bitmap, s->sync_bitmap, + NULL, true); if (local_err) { goto fail; } --=20 2.20.1