From nobody Fri Apr 19 11:09:01 2024 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-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=1578594728; cv=none; d=zohomail.com; s=zohoarc; b=Q9dL53qQ0DpHCibTq7JWmQpweopa6i2EcZ40SfIgH1Jk8xCQwqBiIE9rtSAJckMEM1PBdTNSKIlj5Z1NRkbqoQhqup0fft1C1IE7arVAfqhtgSf+uoU5g9knU9P3XAdFXqlHwaZu6evh8w+LBKCEz4EF5dbzZ/kFUFSoZtFETy8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578594728; 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=7RxhSKr5m1QQA84l7pM4/vOdwqSNbpdXwW92oCW5L20=; b=lX67p0rhe1D63Th9IOAjyA0ydpJX8fQJwMfPpilf2WZ02pN1TACSDM7m3+KkQllxNvq7MUAJeSMBzyzK9Hdg6s0hBYNIisqkxx9XLo3Zwc3eWB42eyIqLDpQuNHa54ty74ehPzrKTy1OTFLCQE1s79lKblFtn1NjUq1LRGeL8RY= 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-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1578594728154275.2583902427184; Thu, 9 Jan 2020 10:32:08 -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-11-IhiHVHu_PdGNrSFmxct_ww-1; Thu, 09 Jan 2020 13:32:05 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 947B9800D41; Thu, 9 Jan 2020 18:31:59 +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 2834710016E8; Thu, 9 Jan 2020 18:31:59 +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 D575238A1; Thu, 9 Jan 2020 18:31:57 +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 009IVuhj019593 for ; Thu, 9 Jan 2020 13:31:56 -0500 Received: by smtp.corp.redhat.com (Postfix) id B05215C54A; Thu, 9 Jan 2020 18:31:56 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 12F0E5C541 for ; Thu, 9 Jan 2020 18:31:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578594727; 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=7RxhSKr5m1QQA84l7pM4/vOdwqSNbpdXwW92oCW5L20=; b=VaQgFZYAgWQ1BlsN4cSiD/Nl+u4i/zxcj75gMRZSUdEFE07lHmgsxPlINkvHKeU5DmhH1p 55PuJUrZcTGHV9DQ+kPRAH7wJz7GSQCQTi6+D/yVesfFcPD/zlVuXBz+akgYF+HM5O9RyW N0ljeusFEJB7yIlLNTEgR61du3t9R0Q= From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 9 Jan 2020 19:31:50 +0100 Message-Id: <6f254093c84e89a4abaf1df1aa84357937d9a6cf.1578594614.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 Subject: [libvirt] [PATCH 1/3] conf: backup: Allow configuration of names exported via NBD 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.84 on 10.5.11.22 X-MC-Unique: IhiHVHu_PdGNrSFmxct_ww-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" If users wish to use different name for exported disks or bitmaps the new fields allow to do so. Additionally they also document the current settings. Signed-off-by: Peter Krempa Reviewed-by: Daniel Henrique Barboza --- docs/formatbackup.html.in | 9 +++++++++ docs/schemas/domainbackup.rng | 8 ++++++++ src/conf/backup_conf.c | 11 +++++++++++ src/conf/backup_conf.h | 2 ++ tests/domainbackupxml2xmlin/backup-pull-seclabel.xml | 2 +- tests/domainbackupxml2xmlout/backup-pull-seclabel.xml | 2 +- 6 files changed, 32 insertions(+), 2 deletions(-) diff --git a/docs/formatbackup.html.in b/docs/formatbackup.html.in index 1c690901c7..7d2c6f1599 100644 --- a/docs/formatbackup.html.in +++ b/docs/formatbackup.html.in @@ -85,6 +85,15 @@
Setting this attribute to yes(default) spec= ifies that the disk should take part in the backup and using no excludes the disk from the backup.
+
exportname
+
Allows to modify the NBD export name for the given disk. + By default equal to disk target. + Valid only for pull mode backups.
+
exportbitmap
+
Allows to modify the name of the bitmap describing dirty + blocks for an incremental backup exported via NBD export n= ame + for the given disk. + Valid only for pull mode backups.
type
A mandatory attribute to describe the type of the disk, except when backup=3D'no' is diff --git a/docs/schemas/domainbackup.rng b/docs/schemas/domainbackup.rng index c1e4d80302..395ea841f9 100644 --- a/docs/schemas/domainbackup.rng +++ b/docs/schemas/domainbackup.rng @@ -165,6 +165,14 @@ + + + + + + + + diff --git a/src/conf/backup_conf.c b/src/conf/backup_conf.c index aa11967d2a..a4b87baa55 100644 --- a/src/conf/backup_conf.c +++ b/src/conf/backup_conf.c @@ -71,6 +71,8 @@ virDomainBackupDefFree(virDomainBackupDefPtr def) virDomainBackupDiskDefPtr disk =3D def->disks + i; g_free(disk->name); + g_free(disk->exportname); + g_free(disk->exportbitmap); virObjectUnref(disk->store); } @@ -124,6 +126,11 @@ virDomainBackupDiskDefParseXML(xmlNodePtr node, if (def->backup =3D=3D VIR_TRISTATE_BOOL_NO) return 0; + if (!push) { + def->exportname =3D virXMLPropString(node, "exportname"); + def->exportbitmap =3D virXMLPropString(node, "exportbitmap"); + } + if (internal) { if (!(state =3D virXMLPropString(node, "state")) || (tmp =3D virDomainBackupDiskStateTypeFromString(state)) < 0) { @@ -165,6 +172,7 @@ virDomainBackupDiskDefParseXML(xmlNodePtr node, storageSourceParseFlags, xmlopt) < 0) return -1; + if ((driver =3D virXPathString("string(./driver/@type)", ctxt))) { def->store->format =3D virStorageFileFormatTypeFromString(driver); if (def->store->format <=3D 0) { @@ -333,6 +341,9 @@ virDomainBackupDiskDefFormat(virBufferPtr buf, if (disk->backup =3D=3D VIR_TRISTATE_BOOL_YES) { virBufferAsprintf(&attrBuf, " type=3D'%s'", virStorageTypeToString= (disk->store->type)); + virBufferEscapeString(&attrBuf, " exportname=3D'%s'", disk->export= name); + virBufferEscapeString(&attrBuf, " exportbitmap=3D'%s'", disk->expo= rtbitmap); + if (disk->store->format > 0) virBufferEscapeString(&childBuf, "\n", virStorageFileFormatTypeToString(disk->s= tore->format)); diff --git a/src/conf/backup_conf.h b/src/conf/backup_conf.h index 7cf44245d4..672fd52ee7 100644 --- a/src/conf/backup_conf.h +++ b/src/conf/backup_conf.h @@ -51,6 +51,8 @@ typedef virDomainBackupDiskDef *virDomainBackupDiskDefPtr; struct _virDomainBackupDiskDef { char *name; /* name matching the 1525889631 - + diff --git a/tests/domainbackupxml2xmlout/backup-pull-seclabel.xml b/tests/= domainbackupxml2xmlout/backup-pull-seclabel.xml index c631c9b979..450f007d3a 100644 --- a/tests/domainbackupxml2xmlout/backup-pull-seclabel.xml +++ b/tests/domainbackupxml2xmlout/backup-pull-seclabel.xml @@ -2,7 +2,7 @@ 1525889631 - + --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri Apr 19 11:09:01 2024 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=1578594743; cv=none; d=zohomail.com; s=zohoarc; b=HLZ34K7fFpjG86FNglx9GwDenjxFtqzyMlsHFl6sTizWth44kpnV1NGg0y8I6dr8zaTVN+XHPEh1168dXVwvz/maLcyvFwqv5tOmWEHBOtmjgbdBtXJt4YR2kIW2j2TRuNo6f4jxUlDRhGmx1UL1osEXEBGACXqLoHRg4VMia8w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578594743; 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=oj9FL+TADTA+u+OYT+2GEXfgX0BdQRZ0zX5g+xg6B7M=; b=T3vsD9EtY1DLLnxfNblnARo6EtTkBhUVANUPZxCHKLiPylUOIfCwolt+wSypYl5+0oZva7UlOBW5RTQll6oI7S0rCCcblc8qXRBEKfMW1Q9foMbuMh60QJtIR3CSjynM4AsZpOPy3RHUVcA7i9Ex5fVJWThxb0kv8VD7UxwRCbo= 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 1578594743329940.95744107267; Thu, 9 Jan 2020 10:32:23 -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-385-1tI1kv_SPgOXKqtRqb_YUw-1; Thu, 09 Jan 2020 13:32:15 -0500 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 8DA60911A4; Thu, 9 Jan 2020 18:32:09 +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 6170C60C85; Thu, 9 Jan 2020 18:32:09 +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 1DCF5503C8; Thu, 9 Jan 2020 18:32:09 +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 009IVvvq019603 for ; Thu, 9 Jan 2020 13:31:57 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8100D5C54A; Thu, 9 Jan 2020 18:31:57 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 09E475C541 for ; Thu, 9 Jan 2020 18:31:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578594742; 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=oj9FL+TADTA+u+OYT+2GEXfgX0BdQRZ0zX5g+xg6B7M=; b=ZZzpvhJQT9Fb7eWDf7/Nxb8ZMx0mF7YaS+RFo0xz9PrC8Kdx3qB/cZNwb9LgB1rmmkhDXw jBM8noJs9HB61L2nAtsmnPRBQQ5mYsyib/dx98HoNaRKixXof5kOlAcaPJ5gpek/zc9fF7 NV8FPG5mbuyLdERodYyar4YWA20y5L8= From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 9 Jan 2020 19:31:51 +0100 Message-Id: <4304f9a8479836ca0aeed1973a8e02c0eff274ea.1578594614.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 Subject: [libvirt] [PATCH 2/3] qemu: backup: Implement support for backup disk export name configuration 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-MC-Unique: 1tI1kv_SPgOXKqtRqb_YUw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Pass the exportname as configured when exporting the image via NBD and fill it with the default if it's not configured. Signed-off-by: Peter Krempa Reviewed-by: Daniel Henrique Barboza Reviewed-by: Eric Blake --- src/qemu/qemu_backup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c index c47de2f4a8..2cc0e6ab07 100644 --- a/src/qemu/qemu_backup.c +++ b/src/qemu/qemu_backup.c @@ -548,9 +548,12 @@ qemuBackupBeginPullExportDisks(virDomainObjPtr vm, for (i =3D 0; i < ndisks; i++) { struct qemuBackupDiskData *dd =3D disks + i; + if (!dd->backupdisk->exportname) + dd->backupdisk->exportname =3D g_strdup(dd->domdisk->dst); + if (qemuMonitorNBDServerAdd(priv->mon, dd->store->nodeformat, - dd->domdisk->dst, + dd->backupdisk->exportname, false, dd->incrementalBitmap) < 0) return -1; --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri Apr 19 11:09:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; 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 205.139.110.61 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=1578594741; cv=none; d=zohomail.com; s=zohoarc; b=XWUw2ypOVosHhhs7RKOBARDQ5j+DNUj5F9YSEOsG/VA+vJW/5pHa/ZixJ2MgOonssNZcA0kkQdMzpVFcm5WNIapyWGO3VzuWErxs1kvXi13EMUNe/Ar0IpeCiR79zxeWgm23VHFdYUzoJIhSS3UKe58M97YXlH6glf2RNzTRHNI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578594741; 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=nS79Eb3A8AzF7SeL0XhcebP4LFSTVoremjaoZrN+swA=; b=oH/7AwhYL8/t0pIdhv0U46ILwjJtUw6JZlR1mgSP7mfKojz0WuVcNuJTLYSa+2DBvpR4XAjXA5i7NyjO5UfQ7tgdmAsCo125PSkc6hJETLWGJXpKFfhwl/RqUhZOmud9ym7TG/4Ztx3A9AH45sO8A+96vkolypbhKC2FRc2c6p4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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 [205.139.110.61]) by mx.zohomail.com with SMTPS id 1578594741756621.3237206520788; Thu, 9 Jan 2020 10:32:21 -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-368-YYcour_qO8m23E30FEyWCw-1; Thu, 09 Jan 2020 13:32:18 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7F952911AC; Thu, 9 Jan 2020 18:32:13 +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 576F886CC1; Thu, 9 Jan 2020 18:32:13 +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 116B818089CD; Thu, 9 Jan 2020 18:32:13 +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 009IVwNW019611 for ; Thu, 9 Jan 2020 13:31:58 -0500 Received: by smtp.corp.redhat.com (Postfix) id 522F65C54A; Thu, 9 Jan 2020 18:31:58 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id CF0185C541 for ; Thu, 9 Jan 2020 18:31:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578594740; 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=nS79Eb3A8AzF7SeL0XhcebP4LFSTVoremjaoZrN+swA=; b=iA9He0STbPrTQaAs6mvjdfOV23Y/pmRrBYL3JuCt7ipwUwJgljCwnxsnwVPCA8+XBdjNO1 v+ZVDEEVARrZcn8q9WMpye8jpG7+C1pj1KQr31tSZP8b+fI+qI2Gw8ZxR17coVmbbT+r+t oDBrap8a5T80ruYotGTehO0o0Mou/S8= From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 9 Jan 2020 19:31:52 +0100 Message-Id: <0e795d9453828db1a5b0b6a859b33e57f4d051ff.1578594614.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 Subject: [libvirt] [PATCH 3/3] qemu: backup: Implement support for backup disk bitmap name configuration 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.13 X-MC-Unique: YYcour_qO8m23E30FEyWCw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Use the user-configured name of the bitmap when merging the appropriate bitmaps for an incremental backup so that the user can see it as configured. Additionally expose the default bitmap name if nothing is configured. Signed-off-by: Peter Krempa Reviewed-by: Daniel Henrique Barboza --- src/qemu/qemu_backup.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c index 2cc0e6ab07..23518a5d40 100644 --- a/src/qemu/qemu_backup.c +++ b/src/qemu/qemu_backup.c @@ -322,7 +322,10 @@ qemuBackupDiskPrepareDataOne(virDomainObjPtr vm, return -1; if (incremental) { - dd->incrementalBitmap =3D g_strdup_printf("backup-%s", dd->domdisk= ->dst); + if (dd->backupdisk->exportbitmap) + dd->incrementalBitmap =3D g_strdup(dd->backupdisk->exportbitma= p); + else + dd->incrementalBitmap =3D g_strdup_printf("backup-%s", dd->dom= disk->dst); if (qemuBackupDiskPrepareOneBitmaps(dd, actions, incremental, blockNamedNodeData) < 0) @@ -368,6 +371,10 @@ static int qemuBackupDiskPrepareDataOnePull(virJSONValuePtr actions, struct qemuBackupDiskData *dd) { + if (!dd->backupdisk->exportbitmap && + dd->incrementalBitmap) + dd->backupdisk->exportbitmap =3D g_strdup(dd->incrementalBitmap); + if (qemuMonitorTransactionBackup(actions, dd->domdisk->src->nodeformat, dd->blockjob->name, --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list