From nobody Mon Feb 9 03:46:39 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=1579883421; cv=none; d=zohomail.com; s=zohoarc; b=Yy1OHmH/BnUx9LFYu2B5tTvORcqlpZeJ/9v7WFGgvnx6yobfWx7pwmQzlOuxpPyBLfETlJPUoDN9Wb7wA1/MDjCef/ZiDEdfalvFu0WRp0eMvbytLRvrJwewrsVBGtRBZrgbgn87p60DURSoavWFai9T7e7YuNOBQYF7LQ6pLyo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579883421; 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=WYkBUjoYU+I+8n8NG0w5IsYIgmbHMlhnQBKBrpnSrtw=; b=RyfOw+6a9AAIRL7ke8vHkIEL+tG12OZsgOrfGSEpNYDxIoPAX+WH84kpYvOMrPqwG6HOl+pet8IBfaBHfXiy8mxblECUniuKuV/e7s93Baqys3LlZsuFAoHPFOl/6QM9iTAkbEDSCvc9+TB2UFZ7hA4geTz+2b4JcmkGprEJE7M= 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 1579883421096314.6864285229236; Fri, 24 Jan 2020 08:30:21 -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-79-Arzhq4ppOoOFa5VTaSwVzg-1; Fri, 24 Jan 2020 11:30:17 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7DFE991F03E; Fri, 24 Jan 2020 16:30:10 +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 425A25DA2C; Fri, 24 Jan 2020 16:30:10 +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 AD3F718034EC; Fri, 24 Jan 2020 16:30:09 +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 00OGTmet013364 for ; Fri, 24 Jan 2020 11:29:48 -0500 Received: by smtp.corp.redhat.com (Postfix) id 854995C241; Fri, 24 Jan 2020 16:29:48 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0CBCB5C1B0 for ; Fri, 24 Jan 2020 16:29:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579883420; 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=WYkBUjoYU+I+8n8NG0w5IsYIgmbHMlhnQBKBrpnSrtw=; b=PHexzLXsVdxyCaFX2SP9/z3W7yWG4VObOw1Hq+t+lrVC+JVJKr7ZSlfpFfpG9nPkfGcUrW fOFxSfuJ70zHzFglyvdNAErAZuEQS51Dha2qoGNisr7E3Z9+tbROCPy8DYxSAe/ZG0FexR eWTgMFIKbOI6+Yq4mrjczS2U9GuOyDk= From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 1/2] qemu: snapshot: Always rewrite backingStore data when reusing existing images Date: Fri, 24 Jan 2020 17:29:42 +0100 Message-Id: <256da135e940cf2846cff17680624fb1a9ea312c.1579883300.git.pkrempa@redhat.com> 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.14 X-MC-Unique: Arzhq4ppOoOFa5VTaSwVzg-1 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" Don't adopt the backing store data when reusing images provided by the user. This will force a backing chain re-probe as users might have passed in something unexpected in the overlay where our view of the backing chain would not correspond. This is done only for inactive snapshots as there we have way less verification. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 0b23c747ce..e5e7b05e93 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -14676,7 +14676,8 @@ qemuDomainSnapshotCreateInactiveExternal(virQEMUDri= verPtr driver, if (virStorageSourceInitChainElement(newsrc, defdisk->src, false) = < 0) goto cleanup; - if (virStorageSourceHasBacking(defdisk->src)) { + if (!reuse && + virStorageSourceHasBacking(defdisk->src)) { defdisk->src->readonly =3D true; newsrc->backingStore =3D g_steal_pointer(&defdisk->src); } else { --=20 2.24.1