From nobody Mon Feb 9 10:57:44 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1613735948; cv=none; d=zohomail.com; s=zohoarc; b=VhpJYcPuMgjKFFj54ll9T/CQ8vyoUKROe1c9m5KL8eK0jpmZYPf5EdybyWLVFn0LPUMzuKlC1s48SL+u3SWbB8Q7ssMhmjj95OcnrClTFkE3P0jz6g2EPTaYxXdyUO/Ga3z8KVwy4+WCnvBHaFj9VSw/ZQ4trXnxQl8et4AfJ5I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613735948; 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=hq9zLZbFHbfl/pMwCmB4ceg6ryDXKooyjxmPOX5n/Ro=; b=JbfEb86gZAjOxoUKdNBWPoDTw1nf3sVdAiley1t2L7YOb3cxGRE/tGGgQKOnLfubZDtD2TYjfJ+ZhMigfXYgFWsCG4uNPRWD64fZcZjLEGPv7D/FoSRXyCBoP4V1kzbUoA17DO4AroICRL+UTdKpoqvHIpv7bV8Ple9NQD5kC+s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 161373594841229.54294471567789; Fri, 19 Feb 2021 03:59:08 -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-35-en4Kc9pjN7C8e_RcYxq1Hw-1; Fri, 19 Feb 2021 06:59:05 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 876EF1083EA5; Fri, 19 Feb 2021 11:58:58 +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 5E94410016FD; Fri, 19 Feb 2021 11:58:58 +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 262861809C92; Fri, 19 Feb 2021 11:58:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11JBwkOa008368 for ; Fri, 19 Feb 2021 06:58:46 -0500 Received: by smtp.corp.redhat.com (Postfix) id ED5C960938; Fri, 19 Feb 2021 11:58:46 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4F4D36087C for ; Fri, 19 Feb 2021 11:58:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613735947; 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=hq9zLZbFHbfl/pMwCmB4ceg6ryDXKooyjxmPOX5n/Ro=; b=iDKZLscNdAs1Xq+l3/0k1oaYw8ekY7CJZtdUA1ZKrOktWizfmDS6F4RMAfK51d91/WuRQa ZP9wIMO/LqXzRkveej7PFvA9i1agLXueT0GfKs0SM/avlcv9/yvH3If8NIv1jGR1at8YMo 9Qn+R83E6Ib0RM06Zmgz4LT9B10N4dY= X-MC-Unique: en4Kc9pjN7C8e_RcYxq1Hw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 06/15] qemu: blockjob: Use qemuMonitorBitmapRemove for single bitmap removal Date: Fri, 19 Feb 2021 12:58:18 +0100 Message-Id: <230b1d351648c6090ea7985d40979fab48f7a290.1613735605.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.84 on 10.5.11.22 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