From nobody Wed Apr 24 14:46:55 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=1568062376; cv=none; d=zoho.com; s=zohoarc; b=gpLy5Yli7DutBgCQLSRHi1rIlhrdSTjdi3B/10h6pX/FPADrYNCTeKbGbg0W+vcMcfQvA2zlTIQJx8WpzrfZshxcrdYthcDuFjRTbLLXSCCdW9FWNQAaEsSQSnwziXOmCzR2HIquk5hB+0cw0es1ehrKBhWbfAaXWehbwyrFofg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568062376; 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=LhRlfDFtrDazOSDGszbCfedt7ed811/DM6xkl7MlMaM=; b=I6tWkFTLXUk+XUSJSKzQF+RwqDHjmGTkT3O6isnCJPh+VLGF7XpvIGAw8+jsK27clh1yZdmWaOvF1912DEXymkoqlF0WMXraoNamVsDNabExMlehRQfobPCP9ej8TajNtQLOC6aO91T612xI1tnS/QGRCBtJ5xLGxJwMwdQuXV0= 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 1568062376124585.194457489936; Mon, 9 Sep 2019 13:52:56 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 8D2F9307D8B9; Mon, 9 Sep 2019 20:52:52 +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 1D51160925; Mon, 9 Sep 2019 20:52:51 +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 83EF0180B536; Mon, 9 Sep 2019 20:52:47 +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 x89Kqj3O004406 for ; Mon, 9 Sep 2019 16:52:45 -0400 Received: by smtp.corp.redhat.com (Postfix) id C61621001938; Mon, 9 Sep 2019 20:52:45 +0000 (UTC) Received: from blue.redhat.com (ovpn-116-234.phx2.redhat.com [10.3.116.234]) by smtp.corp.redhat.com (Postfix) with ESMTP id 932CF10018F8 for ; Mon, 9 Sep 2019 20:52:43 +0000 (UTC) From: Eric Blake To: libvir-list@redhat.com Date: Mon, 9 Sep 2019 15:52:42 -0500 Message-Id: <20190909205242.15406-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] qemu: Fix regression in 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Mon, 09 Sep 2019 20:52:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Commit f10562799 introduced a regression: if reverting to a snapshot fails early (such as when we refuse to revert to an external snapshot), we lose track of the domain's current snapshot. See: https://bugzilla.redhat.com/1738747 Signed-off-by: Eric Blake Reviewed-by: Daniel Henrique Barboza --- src/qemu/qemu_driver.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index b28a26c3d6..093b15f500 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -16941,8 +16941,6 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr sna= pshot, virDomainSnapshotSetCurrent(vm->snapshots, NULL); ret =3D -1; } - } else if (snap) { - virDomainSnapshotSetCurrent(vm->snapshots, NULL); } if (ret =3D=3D 0 && config && vm->persistent && !(ret =3D virDomainSaveConfig(cfg->configDir, driver->caps, --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list