From nobody Mon Nov 25 20:24:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1594909555; cv=none; d=zohomail.com; s=zohoarc; b=TArej8Q9sthgh9NXP3sSuFEUFKivp8YRo6E23n0EKLnvRCJSkpa2vhp8I0ZCQC/22CwRzGjtLKHKu8LkCjf/ekrkjBkcaE0lMwHjDWfWH7m/h/gHbj1+D1Z+NjydR+RMpAr4lSCwXCjKt0rGoIrB5i2qw+/4ubJcjqM0kFhfeU0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594909555; 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=kWneWESwxj4LvyrHJIzd3PSmlqPjjDYvcSn6CjY9wLU=; b=Lgf4zV3XT5scM5N0S7pPHxtnT2hOJvRZUbPHP8Ee6TQ2iFRAPQSp4gtWTn7B4q2gabDpJ4XgKluEB1Spfw3yJ/zBAynxxHujRXrwEAN0zjRoBnif9Dh/9ux+HTaLzwm65waopHyi8/htgPEs1NZErr/4n+K081HZz/rzywkCazM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1594909555929707.3929126861104; Thu, 16 Jul 2020 07:25:55 -0700 (PDT) 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-236-cZYk2WdSMcespEPQDOB8Vw-1; Thu, 16 Jul 2020 10:25:49 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 23892803F19; Thu, 16 Jul 2020 14:24:35 +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 F2BDD72AE1; Thu, 16 Jul 2020 14:24:34 +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 C4C4D1809554; Thu, 16 Jul 2020 14:24:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06GEKVr3028878 for ; Thu, 16 Jul 2020 10:20:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 246A561475; Thu, 16 Jul 2020 14:20:31 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id 784EE6149A for ; Thu, 16 Jul 2020 14:20:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594909554; 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=kWneWESwxj4LvyrHJIzd3PSmlqPjjDYvcSn6CjY9wLU=; b=Z2rebaloR0L7Slky/lWh227R54tZ/Lxb2d3ihTm44kdUjV8gWmRJREIqDIdMOKPKHbJi0M g7oRgIstZ/1/YJ1koGDf/Miq+ICnPUfKA7kz1MRWCVY3mZ5ua9Mwwqvk+q066350pEze3q BxLVkKaHZwkbondmv0o6m9drObwOR4Y= X-MC-Unique: cZYk2WdSMcespEPQDOB8Vw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/5] qemu: blockjob: Actually delete temporary bitmap on failed active commit Date: Thu, 16 Jul 2020 16:20:19 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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.15 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" Commit 20a7abc2d2d tried to delete the possibly leftover bitmap but neglected to call the actual monitor to do so. Signed-off-by: Peter Krempa Reviewed-by: Eric Blake --- src/qemu/qemu_blockjob.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c index 9b78733c53..c49c98e547 100644 --- a/src/qemu/qemu_blockjob.c +++ b/src/qemu/qemu_blockjob.c @@ -1416,8 +1416,10 @@ qemuBlockJobProcessEventConcludedCopyAbort(virQEMUDr= iverPtr driver, static void qemuBlockJobProcessEventFailedActiveCommit(virQEMUDriverPtr driver, virDomainObjPtr vm, - qemuBlockJobDataPtr job) + qemuBlockJobDataPtr job, + qemuDomainAsyncJob asyncJob) { + qemuDomainObjPrivatePtr priv =3D vm->privateData; g_autoptr(virJSONValue) actions =3D virJSONValueNewArray(); virDomainDiskDefPtr disk =3D job->disk; @@ -1429,6 +1431,13 @@ qemuBlockJobProcessEventFailedActiveCommit(virQEMUDr= iverPtr driver, ignore_value(qemuMonitorTransactionBitmapRemove(actions, disk->mirror-= >nodeformat, "libvirt-tmp-activewri= te")); + if (qemuDomainObjEnterMonitorAsync(priv->driver, vm, asyncJob) < 0) + return; + + qemuMonitorTransaction(priv->mon, &actions); + + if (qemuDomainObjExitMonitor(priv->driver, vm) < 0) + return; /* Ideally, we would make the backing chain read only again (yes, SELi= nux * can do that using different labels). But that is not implemented ye= t and @@ -1553,7 +1562,7 @@ qemuBlockJobEventProcessConcludedTransition(qemuBlock= JobDataPtr job, if (success) { qemuBlockJobProcessEventCompletedActiveCommit(driver, vm, job,= asyncJob); } else { - qemuBlockJobProcessEventFailedActiveCommit(driver, vm, job); + qemuBlockJobProcessEventFailedActiveCommit(driver, vm, job, as= yncJob); } break; --=20 2.26.2