From nobody Fri Dec 19 06:38:48 2025 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=1571415118; cv=none; d=zoho.com; s=zohoarc; b=YVQcrWUnEbGEzGXV9ZOgVdD2D8YqdkOSOs1HIsjJQ75+LATcU6oAr3LQFVVAGwAlrIKu5BoadatzC9QsfFBTtm0Ubs79ZjVNhQKTRbx2u2sPwEbI+fSZLjGtsEBdNOj+halmgRltWFR6T6HZCJfujta6nL8EH8VdrblSjhchbNw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571415118; 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=vGsuE5O0Te5HIyjCzHj/xeOE00oesMuKIRVj+0PpWP0=; b=iAnxtA7cw/6jfkqrZPMcVwt6TK30WOAS70X6zbX07uT6T1+qCBEsRph2tr8NPseJMp2XV2lfTNuFcRfQa6Xe7DeGC7NUojyNQuE7JeNQu5zrQumCiZawP1dUN2Nk1U0ubHjni9tAYKP4nCOzRSzMVTtc3Jmb0JbKGUXnh72RYFo= 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 1571415118902773.2211001486271; Fri, 18 Oct 2019 09:11:58 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5AEE7C08EC09; Fri, 18 Oct 2019 16:11:57 +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 2967061F22; Fri, 18 Oct 2019 16:11:57 +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 DEEDB1806B09; Fri, 18 Oct 2019 16:11:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9IGBoOk004710 for ; Fri, 18 Oct 2019 12:11:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9AC33600C4; Fri, 18 Oct 2019 16:11:50 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id F1C51600C8; Fri, 18 Oct 2019 16:11:49 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 18 Oct 2019 18:11:02 +0200 Message-Id: <6f9bfedfbb1a773b3b3b7f02befe9df0139b7573.1571414890.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH RFC 17/40] conf: snapshot: Don't clear current snapshot when redefining an existing one 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 18 Oct 2019 16:11:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" There's no point in clearing the current snapshot when we are just changing the definition of the current snapshot as by the virtue of the 'update_current' flag the same snapshot would become current in qemuDomainSnapshotCreateXML. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/conf/snapshot_conf.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index 0e9d307321..ec47e14955 100644 --- a/src/conf/snapshot_conf.c +++ b/src/conf/snapshot_conf.c @@ -989,7 +989,7 @@ virDomainSnapshotRedefinePrep(virDomainObjPtr vm, virDomainSnapshotDefPtr *defptr, virDomainMomentObjPtr *snap, virDomainXMLOptionPtr xmlopt, - bool *update_current, + bool *update_current G_GNUC_UNUSED, unsigned int flags) { virDomainSnapshotDefPtr def =3D *defptr; @@ -1012,11 +1012,6 @@ virDomainSnapshotRedefinePrep(virDomainObjPtr vm, return -1; } if (other) { - if (other =3D=3D virDomainSnapshotGetCurrent(vm->snapshots)) { - *update_current =3D true; - virDomainSnapshotSetCurrent(vm->snapshots, NULL); - } - /* Drop and rebuild the parent relationship, but keep all * child relations by reusing snap. */ virDomainMomentDropParent(other); --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list