From nobody Mon Feb 9 03:48:20 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1613057930; cv=none; d=zohomail.com; s=zohoarc; b=DyVVKsMWD7KtsTihh+bnd2hrGHWVv1DpW3cy67HJK+e9CIT9evd4Itf/dGMVEEXaJZVf2zqnTIy68il2eNJCeW0mcWweGR1wg6TWScr6AXZS3u6864r2uwalmnrw8FkICLDn4ryiVA6u0CqEBM/iblMWGUsYsuDiEE0ta8LnuhM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613057930; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=C07Yt5u8KMEOMfE3yj9Si9obUFAVk1aiMxH8/yhj7lI=; b=g6E7UtHZY381t76rRG/r1oE4730qW3CKXjMCBZ7dtlGFjlhMmKLRfIEWHKNpigZQKtHkxlBhDDPFELQcC5yKlOoXwsHfIxzEZjv5qda4L7x1RnKiZQg/m0gLzGrkfuggwpyzAKeAxGiL/+IH42T5Wqf13W1zS2QwphN6xp6VSe4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 161305793025021.50804271099628; Thu, 11 Feb 2021 07:38:50 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-412-CctPwR7cNy2tvh4nIiRVsg-1; Thu, 11 Feb 2021 10:38:45 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4E05680196C; Thu, 11 Feb 2021 15:38:38 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B80E60C47; Thu, 11 Feb 2021 15:38:38 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E736218077BA; Thu, 11 Feb 2021 15:38:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11BFcF5M019179 for ; Thu, 11 Feb 2021 10:38:15 -0500 Received: by smtp.corp.redhat.com (Postfix) id B39B85D767; Thu, 11 Feb 2021 15:38:15 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1B2985D74F for ; Thu, 11 Feb 2021 15:38:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613057929; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=C07Yt5u8KMEOMfE3yj9Si9obUFAVk1aiMxH8/yhj7lI=; b=OVt296qnWj9ee5hPv9qxTSTiSRFGmLppzXJvsJmf1wMuKjBGwkmw7Gf7Gq1XLhGe/Zt6Bw I/y8IfxPhUpMZqNYHaVyEKLCmddWXwBnK2X+47dT4L6qnJENUS2dDN9cgLR5W2360GkFMk SpnqH7DgzYzCIc3TNq9PRfgq5vbDcy8= X-MC-Unique: CctPwR7cNy2tvh4nIiRVsg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 10/19] qemu: blockjob: Use qemuMonitorBitmapRemove for single bitmap removal Date: Thu, 11 Feb 2021 16:37:49 +0100 Message-Id: <4bc2af4d1fa6a224879a5c1bbb9d743cc1b9b746.1613057278.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" There's no need in the cleanup steps to invoke a transaction to delete a single bitmap. Signed-off-by: Peter Krempa Reviewed-by: Jiri Denemark --- src/qemu/qemu_blockjob.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c index 582fe45c66..aa065b1319 100644 --- a/src/qemu/qemu_blockjob.c +++ b/src/qemu/qemu_blockjob.c @@ -1420,7 +1420,6 @@ qemuBlockJobProcessEventFailedActiveCommit(virQEMUDri= verPtr driver, qemuDomainAsyncJob asyncJob) { qemuDomainObjPrivatePtr priv =3D vm->privateData; - g_autoptr(virJSONValue) actions =3D virJSONValueNewArray(); virDomainDiskDefPtr disk =3D job->disk; VIR_DEBUG("active commit job '%s' on VM '%s' failed", job->name, vm->d= ef->name); @@ -1428,13 +1427,12 @@ qemuBlockJobProcessEventFailedActiveCommit(virQEMUD= riverPtr driver, if (!disk) return; - ignore_value(qemuMonitorTransactionBitmapRemove(actions, disk->mirror-= >nodeformat, - "libvirt-tmp-activewri= te")); - if (qemuDomainObjEnterMonitorAsync(priv->driver, vm, asyncJob) < 0) return; - qemuMonitorTransaction(priv->mon, &actions); + qemuMonitorBitmapRemove(priv->mon, + disk->mirror->nodeformat, + "libvirt-tmp-activewrite"); if (qemuDomainObjExitMonitor(priv->driver, vm) < 0) return; @@ -1502,7 +1500,6 @@ qemuBlockJobProcessEventConcludedBackup(virQEMUDriver= Ptr driver, unsigned long long progressTotal) { g_autoptr(qemuBlockStorageSourceAttachData) backend =3D NULL; - g_autoptr(virJSONValue) actions =3D NULL; qemuBackupNotifyBlockjobEnd(vm, job->disk, newstate, job->errmsg, progressCurrent, progressTotal, asyncJob); @@ -1511,23 +1508,16 @@ qemuBlockJobProcessEventConcludedBackup(virQEMUDriv= erPtr driver, !(backend =3D qemuBlockStorageSourceDetachPrepare(job->data.backup= .store, NULL))) return; - if (job->data.backup.bitmap) { - actions =3D virJSONValueNewArray(); - - if (qemuMonitorTransactionBitmapRemove(actions, - job->disk->src->nodeformat, - job->data.backup.bitmap) < = 0) - return; - } - if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) return; if (backend) qemuBlockStorageSourceAttachRollback(qemuDomainGetMonitor(vm), bac= kend); - if (actions) - qemuMonitorTransaction(qemuDomainGetMonitor(vm), &actions); + if (job->data.backup.bitmap) + qemuMonitorBitmapRemove(qemuDomainGetMonitor(vm), + job->disk->src->nodeformat, + job->data.backup.bitmap); if (qemuDomainObjExitMonitor(driver, vm) < 0) return; --=20 2.29.2