From nobody Sun Feb 8 23:41:50 2026 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=1582897250; cv=none; d=zohomail.com; s=zohoarc; b=Nt8GCvQ56xotJj9TSY6UuzeGAn+hCPqduC64BWDX7WgxK1ITJCmcWxheVfrkkDC4ADqGqPpwPQGFWZDvkaRcCEuWkeBrj4Res8CHC8zX7dRkbY8Q+2fII2/cD0hUz2kXK5B61+PsaXJScvpSYGc4PqbpwOQF7KmPyOnhpp9GYTM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582897250; 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=wwseleblJ6i6JSuzPvqop7iwGvFfljNVhqnRStjqAOE=; b=ltFml3HeOt+vpdUKaeU+uFvK7GhxTaq7+qmrHnB2m83J5D3fENUOdqbAo7DyuAOxPXChjN35vKOvN+oNmPfqNqUvq9/Lbjrp6mcgmrT9WCJbZtRpCQK4xqFzrKd43uGWvgY4qP04wfvHSytyiYATgNVwoZDTT0Wn0nfCt0nXBCw= 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 1582897250956930.8722038798644; Fri, 28 Feb 2020 05:40: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-222-NjHiaffXMWOaXRxq2DrKIA-1; Fri, 28 Feb 2020 08:40:47 -0500 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 826E710CE781; Fri, 28 Feb 2020 13:40:40 +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 5407490CC8; Fri, 28 Feb 2020 13:40:40 +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 F197784496; Fri, 28 Feb 2020 13:40:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01SDe8fh025659 for ; Fri, 28 Feb 2020 08:40:08 -0500 Received: by smtp.corp.redhat.com (Postfix) id F3074101D481; Fri, 28 Feb 2020 13:40:07 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7A1561001B2C for ; Fri, 28 Feb 2020 13:40:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582897249; 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=wwseleblJ6i6JSuzPvqop7iwGvFfljNVhqnRStjqAOE=; b=MOVNMK6g0ZTRLoKqQ2OUzgLfHHcl9UEYAA7M13NN3RmVhLdKrbHp83NSiVSDYcTsVc6t9T 6eL2yrvbPVH58kji3HK3fbgaPnYI4fafs/qxlONFmIUKzR+bz4Q/u9Hgz68WqG7WMxQtgO +mL6rR+tV8sd1EY2yxgg6Wv98bHdWsE= X-MC-Unique: NjHiaffXMWOaXRxq2DrKIA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 4/8] qemuCheckpointDiscardBitmaps: Reopen images for bitmap modifications Date: Fri, 28 Feb 2020 14:39:56 +0100 Message-Id: <39a0981dbbfb38d458b4da99772e743e9cec9e08.1582895792.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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 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 --- src/qemu/qemu_checkpoint.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c index a387e7dfe7..32b0ab0faf 100644 --- a/src/qemu/qemu_checkpoint.c +++ b/src/qemu/qemu_checkpoint.c @@ -299,6 +299,9 @@ qemuCheckpointDiscardBitmaps(virDomainObjPtr vm, if (qemuDomainStorageSourceAccessAllow(driver, vm, src, false, fal= se) < 0) goto relabel; + if (qemuBlockReopenReadWrite(vm, src, QEMU_ASYNC_JOB_NONE) < 0) + goto relabel; + relabelimages =3D g_slist_prepend(relabelimages, src); } @@ -311,6 +314,7 @@ qemuCheckpointDiscardBitmaps(virDomainObjPtr vm, for (next =3D relabelimages; next; next =3D next->next) { virStorageSourcePtr src =3D next->data; + ignore_value(qemuBlockReopenReadOnly(vm, src, QEMU_ASYNC_JOB_NONE)= ); ignore_value(qemuDomainStorageSourceAccessAllow(driver, vm, src, t= rue, false)); } --=20 2.24.1