From nobody Mon Nov 25 20:48:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1594909542; cv=none; d=zohomail.com; s=zohoarc; b=lXAPT9r33Zgq69pvDtUn6ic1wS0IlvOH45uxfQJOjnRBhmlRrSHanxQ61fR0/SAlIaffghFmP3gByPxJKUPpKuDDwekq7vMF4ecmR2ix6T/yBlO3mXbY50dFx0eMmAzoN6L9QSh8kSBpetN/VmCMCWZNEdgKscOee5/oSsDna9Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594909542; 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=Teqh9HDajWgrZt231oA0JFHOfg3Lus10Jx5qXpEzAJU=; b=OCw5RCJ+7lvGH8hVcrc1hdiUYBei0IjyiaojSWGLV8xw92QKPcicfafhzn5RqcRHdJ7x5VCCozmaEN9yIhBYNvDJkw6ezzb5jBMn7DG4e6dGD8FPHN2/7eqNOVeXJU5qJcvgUvwgpDaB+KjW1rUdxdDcKPNn6SQinOXm1svvSBo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 159490954238967.68583713425801; Thu, 16 Jul 2020 07:25:42 -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-33-481Cfv3mOLKTmXehJHwvUA-1; Thu, 16 Jul 2020 10:25:38 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AE709806413; Thu, 16 Jul 2020 14:24:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 04D9B6FDD1; Thu, 16 Jul 2020 14:24:25 +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 AA1A996239; Thu, 16 Jul 2020 14:24:22 +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 06GEKSf8028865 for ; Thu, 16 Jul 2020 10:20:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id 47F766178C; Thu, 16 Jul 2020 14:20:28 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9096361494 for ; Thu, 16 Jul 2020 14:20:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594909541; 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=Teqh9HDajWgrZt231oA0JFHOfg3Lus10Jx5qXpEzAJU=; b=Wou4iu1SzEiA0W2nmUDbcRD5ge0UOEvkkyr1VXaTiUkRkPsGem3AjULWfpxfMBxv5e+lFh vW3zxEovmlSWG/i/hXDhFx65oSiiMoxkEGdeb7Hysg2PD94bPND7Xzizap2UKlubSCnNuo PjQR3EtxUmes5Kdy+YnPnOFScTB6dtE= X-MC-Unique: 481Cfv3mOLKTmXehJHwvUA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/5] qemu: blockjob: Don't base bitmap handling of active-layer block commit on QEMU_CAPS_BLOCKDEV_REOPEN Date: Thu, 16 Jul 2020 16:20:18 +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.13 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" The handler finalizing the active layer block commit doesn't actually reopen the file for active layer block commit, so the comment and check are invalid. Signed-off-by: Peter Krempa Reviewed-by: Eric Blake --- src/qemu/qemu_blockjob.c | 3 ++- src/qemu/qemu_driver.c | 6 +----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c index 0039bc0e9f..9b78733c53 100644 --- a/src/qemu/qemu_blockjob.c +++ b/src/qemu/qemu_blockjob.c @@ -1101,7 +1101,8 @@ qemuBlockJobProcessEventCompletedCommitBitmaps(virDom= ainObjPtr vm, g_autoptr(virJSONValue) actions =3D NULL; bool active =3D job->type =3D=3D QEMU_BLOCKJOB_TYPE_ACTIVE_COMMIT; - if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN)) + if (!active && + !virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN)) return 0; if (!(blockNamedNodeData =3D qemuBlockGetNamedNodeData(vm, asyncJob))) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index d185666ed8..f5074cb151 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -17386,11 +17386,7 @@ qemuDomainBlockPivot(virQEMUDriverPtr driver, break; case QEMU_BLOCKJOB_TYPE_ACTIVE_COMMIT: - /* we technically don't need reopen here, but we couldn't prepare - * the bitmaps if it wasn't present thus must skip this */ - if (blockdev && - virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN)) { - + if (blockdev) { actions =3D virJSONValueNewArray(); if (qemuMonitorTransactionBitmapAdd(actions, --=20 2.26.2