From nobody Sun Feb 8 13:33:10 2026 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=1583931510; cv=none; d=zohomail.com; s=zohoarc; b=lAFifGvtaltDSP0mkUcpp7Jj3WOjrmWHcY+reQoJR6RKRFeNmWS0Y8dcidojhQPSnUtfs8m3BOzKiDiISPvWYUXGFSHbtgOrDqowPt9tE8jPoZiud9B9+p7Hl0to3KgK/Pg1QyqlmGid2j1nWL6M74V2rTsGXmRBJsUKwBmPrKg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583931510; 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=fSYHRNvMRU/Fc9ZjqV2Mmn5pUWS+ZSzaISRr9j6iP7E=; b=SRII4yrwgkPxsx5SjUuC70su1Vi6JaOz+eqplP4a+E14S3MaiUeligrgsUm4ElgvGKNG0/uXiN5LZme8omBucl4NhpM+npooWdkxGdUjm6m6unK8/soOQoGkcZAVLZW5emryMNmos4D/1R1vrSVcKr4fAYK1U729RU/c4IqncJk= 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 1583931510722567.4342306797646; Wed, 11 Mar 2020 05:58:30 -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-343-o-VtFtpBN2277xiOcPKJpw-1; Wed, 11 Mar 2020 08:56:30 -0400 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 A894813F5; Wed, 11 Mar 2020 12:56:24 +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 7AE811000322; Wed, 11 Mar 2020 12:56:24 +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 310CE1832E29; Wed, 11 Mar 2020 12:56:24 +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 02BCuCVp009307 for ; Wed, 11 Mar 2020 08:56:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id 165A85C219; Wed, 11 Mar 2020 12:56:12 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 67D815C1D8; Wed, 11 Mar 2020 12:56:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583931509; 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=fSYHRNvMRU/Fc9ZjqV2Mmn5pUWS+ZSzaISRr9j6iP7E=; b=WFl0lQXO/F/CaB5sKb6BcR7oJfWH2svJ4czWgdC1qfKpPC+1NJ5MMUWDNvf/jG6LmC1aH1 k41vv2Vb0Vv6l/OG4N9MP3EE4R7bmTxQ7ZYLu1xBVzYP7ZDOFsxBf4sdLj6NLHm8ubloZv m2hb5FNePAtdjBlblB8sP7wQXZ05qwY= X-MC-Unique: o-VtFtpBN2277xiOcPKJpw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 04/19] qemuCheckpointDiscardBitmaps: Reopen images for bitmap modifications Date: Wed, 11 Mar 2020 13:55:49 +0100 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.84 on 10.5.11.22 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" Qemu's bitmap APIs don't reopen the appropriate images read-write for modification. It's libvirt's duty to reopen them via blockdev-reopen if we wish to modify the bitmaps. Use the new helpers to reopen the images for bitmap manipulation. Signed-off-by: Peter Krempa Reviewed-by: Eric Blake --- src/qemu/qemu_checkpoint.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c index ea87b09aa0..5890deb471 100644 --- a/src/qemu/qemu_checkpoint.c +++ b/src/qemu/qemu_checkpoint.c @@ -300,6 +300,10 @@ qemuCheckpointDiscardBitmaps(virDomainObjPtr vm, false, false, false) < 0) goto relabel; + if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN) && + qemuBlockReopenReadWrite(vm, src, QEMU_ASYNC_JOB_NONE) < 0) + goto relabel; + relabelimages =3D g_slist_prepend(relabelimages, src); } @@ -312,6 +316,9 @@ qemuCheckpointDiscardBitmaps(virDomainObjPtr vm, for (next =3D relabelimages; next; next =3D next->next) { virStorageSourcePtr src =3D next->data; + if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN)) + ignore_value(qemuBlockReopenReadOnly(vm, src, QEMU_ASYNC_JOB_N= ONE)); + ignore_value(qemuDomainStorageSourceAccessAllow(driver, vm, src, true, false, false= )); } --=20 2.24.1