From nobody Sun Feb 8 23:19:17 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1604495136; cv=none; d=zohomail.com; s=zohoarc; b=APL0g91xED8qep27gtA6PJ0NEoiCzFc+YF9xi6eRXVaoGyEa7WKA7qzFaBXalzrUlxxDnymI1oLIfGExUPYWEZe1lkTQijcLJTS7g1PMqs0DJGrp+2yONMHgYfWSWVPIQ954MDzqUTnkNs9yz+CQNGUPoS2cOAsiqdqGWZJ7gX8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604495136; 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=PqPThDTQTp68BvyjlndOfVKZ9HGYhNitDEH6DbBSYkY=; b=oDyaoSBUDiO65k3qMKBjpCMx0fpWhzU9Ff/3BGm7pWRYioXDIsORXkKIX23ZMj+sX4HofwunWNMf+1BWBA/dPAuhC6hOHQ8O7QYD1nWQ1xUEyDLEC6jW4UDRbl8uwSBDgkojUJdOe9knTHRMuRkQ2taiKZoSRtfkREgFmyqU3HI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1604495136050699.1374089419818; Wed, 4 Nov 2020 05:05:36 -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-377-IsA3mko4PJmfZvt3_HHGcQ-1; Wed, 04 Nov 2020 08:05:31 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5AFBC8049F5; Wed, 4 Nov 2020 13:05:24 +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 355795C1D0; Wed, 4 Nov 2020 13:05:24 +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 EEB538C7B0; Wed, 4 Nov 2020 13:05:23 +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 0A4D5K1J003047 for ; Wed, 4 Nov 2020 08:05:20 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1F0E71C6; Wed, 4 Nov 2020 13:05:20 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6CF905C1D0 for ; Wed, 4 Nov 2020 13:05:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604495134; 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=PqPThDTQTp68BvyjlndOfVKZ9HGYhNitDEH6DbBSYkY=; b=HI6CXPxhAHgxm7irzzCYHRrB5Xi5d51rfY3eWlfZ3dbMS1HGMF6PpPy1VuHv0w69SREq4h CMPUEE8EZ9CojMjrB6WAt1nN/B/RfSPg12nfmKQChybbruaq+UOMKpJpLdROPGHOtNYXQD Mlhx+G3YtJz9UbDCqy2GVQLN7jbjcHM= X-MC-Unique: IsA3mko4PJmfZvt3_HHGcQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 9/9] qemu: backup: Add partial validation of incremental backup checkpoint Date: Wed, 4 Nov 2020 14:05:07 +0100 Message-Id: <42b612a720ab1fd699c35c1dbbe9dd8ac906dc03.1604495066.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.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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" Verify that the checkpoint requested by an incremental backup exists. Unfortunately validating whether the checkpoint configuration actually matches the disk may not be reasonably feasible as the disk may have been renamed/snapshotted/etc. We still rely on bitmap presence. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_backup.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c index d0c852cf80..92cdf34c46 100644 --- a/src/qemu/qemu_backup.c +++ b/src/qemu/qemu_backup.c @@ -277,6 +277,17 @@ qemuBackupDiskPrepareDataOne(virDomainObjPtr vm, return -1; if (dd->backupdisk->incremental) { + /* We deliberately don't check the config of the disk in the check= point + * definition as it's not guaranteed that the disks still correspo= nd. + * We just verify that a checkpoint exists and later on that the d= isk + * has corresponding bitmap. */ + if (!virDomainCheckpointFindByName(vm->checkpoints, dd->backupdisk= ->incremental)) { + virReportError(VIR_ERR_NO_DOMAIN_CHECKPOINT, + _("Checkpoint '%s' for incremental backup of di= sk '%s' not found"), + dd->backupdisk->incremental, dd->backupdisk->na= me); + return -1; + } + if (dd->backupdisk->exportbitmap) dd->incrementalBitmap =3D g_strdup(dd->backupdisk->exportbitma= p); else --=20 2.26.2