From nobody Fri Dec 19 18:46:53 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1592241086; cv=none; d=zohomail.com; s=zohoarc; b=h/1fXxhmHkTkyjzVp1h55knPaBwVY2lcHTgd4YjIIGpmaHhbF9Ubu9Ad7dtNCCf6rwiUK5aoDFfaT7w3uqnyPuliNq541xKrC2VYgwEi333OoCzW4jTv5bLSXKTUoh7g7B+3kiRzj4wwMzqMXwf+nVzA90CA0y9dz2prk5jyRr0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592241086; 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=2hiXhSamIUpzvnioIS2K4xGQLPFrYl4kULOxytU2lIo=; b=fP60OA98daOZGZb9sNRyGS72VLXX5Y+GoWTSNVkrfAskUVyNgr0nj3faEMkbZg3FdW/rgmgoXpbh9uaEphO8a3juXD0acvw3ufxnWCkcYe+Uasr6N+mRnHCKXaWbPzHSJQYRCgcA1SmyNVTA0RnGDbHlaa3MZKAkPWB+A84AUSs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1592241086382526.3735660007088; Mon, 15 Jun 2020 10:11:26 -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-157-Qp_2oB7hNVSF-5Ehzi3AgA-1; Mon, 15 Jun 2020 13:11:22 -0400 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 F004D873406; Mon, 15 Jun 2020 17:11:15 +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 D16B25C240; Mon, 15 Jun 2020 17:11:15 +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 A395A95AA9; Mon, 15 Jun 2020 17:11:15 +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 05FHAQch004639 for ; Mon, 15 Jun 2020 13:10:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id 83D161001901; Mon, 15 Jun 2020 17:10:26 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF8DD100164D for ; Mon, 15 Jun 2020 17:10:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592241085; 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=2hiXhSamIUpzvnioIS2K4xGQLPFrYl4kULOxytU2lIo=; b=bRphiS1BnJZZb5Upa8Jn38wNvDLEJ0A7nmYKsWaei0ONMU80qvWzPVWIugNrKe7mghSSiS StwIFRdyWd98uD6SXDDfA70idpYu4wzgTa3tVEK/+GZDls1uMxXJ7OlV6eG8Ck/aG2jxdp Qiwco05sJEe+Ct2qkt2cYhiSEjQP3YM= X-MC-Unique: Qp_2oB7hNVSF-5Ehzi3AgA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 03/32] conf: backup: Store incremental backup checkpoint name per-disk Date: Mon, 15 Jun 2020 19:09:50 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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 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" In preparation to allow heterogenous backups store the 'incremental' field per-disk and fill it by default from the per-backup field. Having this will be important once we'll want to allow incremental backup working while hotplugging a new disk. Signed-off-by: Peter Krempa Reviewed-by: Eric Blake --- src/conf/backup_conf.c | 8 ++++++++ src/conf/backup_conf.h | 1 + 2 files changed, 9 insertions(+) diff --git a/src/conf/backup_conf.c b/src/conf/backup_conf.c index c0c6f25d10..92106d8aaa 100644 --- a/src/conf/backup_conf.c +++ b/src/conf/backup_conf.c @@ -72,6 +72,7 @@ virDomainBackupDefFree(virDomainBackupDefPtr def) virDomainBackupDiskDefPtr disk =3D def->disks + i; g_free(disk->name); + g_free(disk->incremental); g_free(disk->exportname); g_free(disk->exportbitmap); virObjectUnref(disk->store); @@ -505,5 +506,12 @@ virDomainBackupAlignDisks(virDomainBackupDefPtr def, } } + for (i =3D 0; i < def->ndisks; i++) { + virDomainBackupDiskDefPtr backupdisk =3D &def->disks[i]; + + if (def->incremental && !backupdisk->incremental) + backupdisk->incremental =3D g_strdup(def->incremental); + } + return 0; } diff --git a/src/conf/backup_conf.h b/src/conf/backup_conf.h index b5685317c5..172eb1cf1c 100644 --- a/src/conf/backup_conf.h +++ b/src/conf/backup_conf.h @@ -51,6 +51,7 @@ typedef virDomainBackupDiskDef *virDomainBackupDiskDefPtr; struct _virDomainBackupDiskDef { char *name; /* name matching the