From nobody Sun Apr 28 20:04:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1558354977; cv=none; d=zoho.com; s=zohoarc; b=MmDrss2ffgR07YZmU8PoevS77T1SYIrKYg6N8i3edQOzFy5Ij7oY/lquZ0EcLkL2AiCpmCtovTzgkFLkXWGMPJ6ROKVX7yCNYy/l2SQ8yleuj+uiEickB9MVWYee4iE3PonVWVJ18WDMtnRgTKzQ2iVUTmF5wmCaJlG1PveSyfw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558354977; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=xGZftajxZvXDSiYMbCdTwvHONy0mAKtykdvdjs22XJ4=; b=I1fjK14Fqf1QtlXhVxRihsMjnR73pk41myOceAbvyBmkvkMVF7DauEa0EfQeZNjmOO+7+EXdGUvWq2ewVokue/wmiJ46ZST4CUFYmMJ5zZ5SU2zDh/Q0uPSIqz58y6R6pPC8lCX8FkpuCYmSR7/8loZ+r/I9Fgc2xH9k8YF144I= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1558354977960728.2940332160966; Mon, 20 May 2019 05:22:57 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CEE5A30842AC; Mon, 20 May 2019 12:22:52 +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 1D3497C0AD; Mon, 20 May 2019 12:22:48 +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 3585E54D3D; Mon, 20 May 2019 12:22:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x4KCMfbO028033 for ; Mon, 20 May 2019 08:22:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8364727BD0; Mon, 20 May 2019 12:22:41 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0D9AE27BCF for ; Mon, 20 May 2019 12:22:36 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Mon, 20 May 2019 14:22:34 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] Revert "qemu: Do not override config XML in case of snapshot revert" 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 20 May 2019 12:22:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" This reverts commit dfd70ca1ebc623fcda788c414a472107b37b2bb8. Pushed by a mistake, sorry. There's still some discussion going on upstream. Signed-off-by: Michal Privoznik Reviewed-by: Daniel Henrique Barboza --- /me needs to learn to clean branches before pushing some stuff. Sorry for the noise. Pushed now. src/qemu/qemu_driver.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 06d8cb2471..9c0796b0a4 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -16243,7 +16243,6 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr sna= pshot, qemuDomainObjPrivatePtr priv; int rc; virDomainDefPtr config =3D NULL; - virDomainDefPtr inactiveConfig =3D NULL; virQEMUDriverConfigPtr cfg =3D NULL; virCapsPtr caps =3D NULL; bool was_stopped =3D false; @@ -16458,7 +16457,7 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr sna= pshot, goto endjob; } if (config) { - virDomainObjAssignDef(vm, config, false, &inactiveConfig); + virDomainObjAssignDef(vm, config, false, NULL); virCPUDefFree(priv->origCPU); VIR_STEAL_PTR(priv->origCPU, origCPU); } @@ -16467,7 +16466,7 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr sna= pshot, load: was_stopped =3D true; if (config) - virDomainObjAssignDef(vm, config, false, &inactiveConfig); + virDomainObjAssignDef(vm, config, false, NULL); =20 /* No cookie means libvirt which saved the domain was too old = to * mess up the CPU definitions. @@ -16526,9 +16525,6 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr sna= pshot, detail); } } - if (inactiveConfig) - VIR_STEAL_PTR(vm->newDef, inactiveConfig); - break; =20 case VIR_DOMAIN_SNAPSHOT_SHUTDOWN: @@ -16556,11 +16552,8 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr sn= apshot, qemuProcessEndJob(driver, vm); goto cleanup; } - if (config) { - virDomainObjAssignDef(vm, config, false, &inactiveConfig); - if (inactiveConfig) - VIR_STEAL_PTR(vm->newDef, inactiveConfig); - } + if (config) + virDomainObjAssignDef(vm, config, false, NULL); =20 if (flags & (VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING | VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED)) { --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list