From nobody Sun Feb 8 19:55:24 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; 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 207.211.31.81 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=1585746688; cv=none; d=zohomail.com; s=zohoarc; b=NGaD0BKN1WAZuJAYoEtYJD8mGfyhkOunxX7CpzBk2Vti2Tv6QaP8/6j1t224EQ7ZVPDglPiW0V+79VodjX/xgh5gyvjISHA5a3vlvFIJvRF1GMUK0Ycn5Nj2HP7tvxQb3CGreLpaLq8p/nJTsFdYW6hjYW8mDrLP2QGTgOyKx/M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585746688; 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=R127DghwRuxw8Tk1ApqqjjrCobcIxd4Ef/dVhvJm8NM=; b=XkEL9hTAc7tNnxPh8JPafyNwkCS1SSrLP2FQ9zTWfu+Dj3A5eBNC34YaNyCxJnMsATIPOqKw32spCb0jHdEV+HZQwwsgyxuJmFgC34DZXGlBlVIUhyneFipjBVbKMj8BLOEZCklp56FJWzzt8HrD3FHtibnmGJy1M9DKSXlQpzY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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 [207.211.31.81]) by mx.zohomail.com with SMTPS id 1585746688402880.2191966286948; Wed, 1 Apr 2020 06:11:28 -0700 (PDT) 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-433-B29H0eHlPJSpuG1gWX621w-1; Wed, 01 Apr 2020 09:11:25 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3ACCA80256F; Wed, 1 Apr 2020 13:11:19 +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 E64A5610B0; Wed, 1 Apr 2020 13:11:18 +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 97BA01808878; Wed, 1 Apr 2020 13:11:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 031DArUq001624 for ; Wed, 1 Apr 2020 09:10:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7B9CBA63A3; Wed, 1 Apr 2020 13:10:53 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id F3C90A63AD for ; Wed, 1 Apr 2020 13:10:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585746687; 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=R127DghwRuxw8Tk1ApqqjjrCobcIxd4Ef/dVhvJm8NM=; b=TW26Q369a5FmbetMePrm8wnVzsvz1ZL6tKdZ2HVoGqds5HZeKvpOJAkqP6wZFhTk8lttJZ XVkfnu4/h5ZYgLNvZyjrNGuTiZ+QT7U5SUvNebZzqlzPG96efyG7st3ULlTbeOShzRDWXH NeqYQ/pS56b2c1KBA2l/9/q+atwKRDM= X-MC-Unique: B29H0eHlPJSpuG1gWX621w-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/2] virDomainCheckpointRedefinePrep: Set 'current' checkpoint if there isn't any Date: Wed, 1 Apr 2020 15:10:47 +0200 Message-Id: <97b2ef7d3dbee1c29a0630418ff925a4e86e2155.1585746591.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.12 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" When redefining checkpoints from scratch we'd not set the 'current' checkpoint if there wasn't any. This meant that the code wasn't ever able to set a 'current' checkpoint as any other one looks up if the parent of the redefined checkpoint is current. Since the backup code then requires the current checkpoint to start the lookup we'd not be able to perform a backup after restoring the checkpoint hierarchy. Reported-by: Eyal Shenitzky Signed-off-by: Peter Krempa Reviewed-by: Eric Blake --- src/conf/checkpoint_conf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c index 26bcfc16b7..d557fada49 100644 --- a/src/conf/checkpoint_conf.c +++ b/src/conf/checkpoint_conf.c @@ -550,6 +550,10 @@ virDomainCheckpointRedefinePrep(virDomainObjPtr vm, *update_current =3D true; } + /* set the first redefined checkpoint as current */ + if (virDomainCheckpointGetCurrent(vm->checkpoints) =3D=3D NULL) + *update_current =3D true; + other =3D virDomainCheckpointFindByName(vm->checkpoints, def->parent.n= ame); if (other) { otherdef =3D virDomainCheckpointObjGetDef(other); --=20 2.25.1