From nobody Sat Apr 27 07:25:42 2024
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
Return-Path:
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by
mx.zohomail.com
with SMTPS id 1553580846831818.345498898765;
Mon, 25 Mar 2019 23:14:06 -0700 (PDT)
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 mx1.redhat.com (Postfix) with ESMTPS id 208D188305;
Tue, 26 Mar 2019 06:14:05 +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 9527E90CCB;
Tue, 26 Mar 2019 06:14:04 +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 72E6641F3D;
Tue, 26 Mar 2019 06:14:02 +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 x2Q6Dxj0001299 for ;
Tue, 26 Mar 2019 02:13:59 -0400
Received: by smtp.corp.redhat.com (Postfix)
id 1E97CA33BB; Tue, 26 Mar 2019 06:13:59 +0000 (UTC)
Received: from blue.redhat.com (ovpn-116-59.phx2.redhat.com [10.3.116.59])
by smtp.corp.redhat.com (Postfix) with ESMTP id 8A7175C232;
Tue, 26 Mar 2019 06:13:58 +0000 (UTC)
From: Eric Blake
To: libvir-list@redhat.com
Date: Tue, 26 Mar 2019 01:13:45 -0500
Message-Id: <20190326061353.7206-2-eblake@redhat.com>
In-Reply-To: <20190326061353.7206-1-eblake@redhat.com>
References: <20190326061353.7206-1-eblake@redhat.com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16
X-loop: libvir-list@redhat.com
Cc: nsoffer@redhat.com, jsnow@redhat.com
Subject: [libvirt] [PATCH v6 1/9] Revert "snapshot: Add
virDomainSnapshotObjListParse"
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.13
X-Greylist: Sender IP whitelisted,
not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]);
Tue, 26 Mar 2019 06:14:05 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
This reverts commit 1b57269cbcfcfe998a065c0c9f0f8db408710d87, and
subsequent refactorings of the function into new files. There are no
callers of this function - I had originally proposed it for
implementing a new bulk snapshot API, but that proved to be too
invasive given RPC limits. I also tried using it for streamlining how
the qemu driver stores snapshot state across libvirtd restarts
internally, but in the end, the risks of a new internal format
outweighed the benefits of one file per snapshot.
Signed-off-by: Eric Blake
Reviewed-by: Daniel P. Berrang=C3=A9
Reviewed-by: J=C3=A1n Tomko
---
src/conf/virdomainsnapshotobjlist.h | 6 --
src/conf/virdomainsnapshotobjlist.c | 105 ----------------------------
src/libvirt_private.syms | 1 -
3 files changed, 112 deletions(-)
diff --git a/src/conf/virdomainsnapshotobjlist.h b/src/conf/virdomainsnapsh=
otobjlist.h
index 3691662b4c..626cdcafa7 100644
--- a/src/conf/virdomainsnapshotobjlist.h
+++ b/src/conf/virdomainsnapshotobjlist.h
@@ -30,12 +30,6 @@
virDomainSnapshotObjListPtr virDomainSnapshotObjListNew(void);
void virDomainSnapshotObjListFree(virDomainSnapshotObjListPtr snapshots);
-int virDomainSnapshotObjListParse(const char *xmlStr,
- const unsigned char *domain_uuid,
- virDomainSnapshotObjListPtr snapshots,
- virCapsPtr caps,
- virDomainXMLOptionPtr xmlopt,
- unsigned int flags);
int virDomainSnapshotObjListFormat(virBufferPtr buf,
const char *uuidstr,
virDomainSnapshotObjListPtr snapshots,
diff --git a/src/conf/virdomainsnapshotobjlist.c b/src/conf/virdomainsnapsh=
otobjlist.c
index 9057ecf587..20f4ff22f2 100644
--- a/src/conf/virdomainsnapshotobjlist.c
+++ b/src/conf/virdomainsnapshotobjlist.c
@@ -39,111 +39,6 @@ struct _virDomainSnapshotObjList {
};
-/* Parse a XML entry into snapshots, which must start
- * empty. Any sub-elements of a must match
- * domain_uuid. @flags is virDomainSnapshotParseFlags. Return the
- * number of snapshots parsed, or -1 on error.
- */
-int
-virDomainSnapshotObjListParse(const char *xmlStr,
- const unsigned char *domain_uuid,
- virDomainSnapshotObjListPtr snapshots,
- virCapsPtr caps,
- virDomainXMLOptionPtr xmlopt,
- unsigned int flags)
-{
- int ret =3D -1;
- xmlDocPtr xml;
- xmlNodePtr root;
- xmlXPathContextPtr ctxt =3D NULL;
- int n;
- size_t i;
- int keepBlanksDefault =3D xmlKeepBlanksDefault(0);
- virDomainMomentObjPtr snap;
- VIR_AUTOFREE(xmlNodePtr *) nodes =3D NULL;
- VIR_AUTOFREE(char *) current =3D NULL;
-
- if (!(flags & VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE) ||
- (flags & VIR_DOMAIN_SNAPSHOT_PARSE_INTERNAL)) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("incorrect flags for bulk parse"));
- return -1;
- }
- if (virDomainMomentObjListSize(snapshots->base) !=3D 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("bulk define of snapshots only possible with "
- "no existing snapshot"));
- return -1;
- }
-
- if (!(xml =3D virXMLParse(NULL, xmlStr, _("(domain_snapshot)"))))
- return -1;
-
- root =3D xmlDocGetRootElement(xml);
- if (!virXMLNodeNameEqual(root, "snapshots")) {
- virReportError(VIR_ERR_XML_ERROR,
- _("unexpected root element <%s>, "
- "expecting "), root->name);
- goto cleanup;
- }
- ctxt =3D xmlXPathNewContext(xml);
- if (ctxt =3D=3D NULL) {
- virReportOOMError();
- goto cleanup;
- }
- ctxt->node =3D root;
- current =3D virXMLPropString(root, "current");
-
- if ((n =3D virXPathNodeSet("./domainsnapshot", ctxt, &nodes)) < 0)
- goto cleanup;
-
- for (i =3D 0; i < n; i++) {
- virDomainSnapshotDefPtr def;
-
- def =3D virDomainSnapshotDefParseNode(xml, nodes[i], caps, xmlopt,=
NULL,
- flags);
- if (!def)
- goto cleanup;
- if (!(snap =3D virDomainSnapshotAssignDef(snapshots, def))) {
- virDomainSnapshotDefFree(def);
- goto cleanup;
- }
- if (virDomainSnapshotRedefineValidate(def, domain_uuid, NULL, NULL,
- flags) < 0)
- goto cleanup;
- }
-
- if (virDomainSnapshotUpdateRelations(snapshots) < 0) {
- virReportError(VIR_ERR_XML_ERROR, "%s",
- _(" contains inconsistent parent-child "
- "relationships"));
- goto cleanup;
- }
-
- if (current) {
- snap =3D virDomainSnapshotFindByName(snapshots, current);
- if (!snap) {
- virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT,
- _("no snapshot matching current=3D'%s'"), curre=
nt);
- goto cleanup;
- }
- virDomainSnapshotSetCurrent(snapshots, snap);
- }
-
- ret =3D n;
- cleanup:
- if (ret < 0) {
- /* There were no snapshots before this call; so on error, just
- * blindly delete anything created before the failure. */
- virDomainMomentObjListRemoveAll(snapshots->base);
- }
- xmlXPathFreeContext(ctxt);
- xmlFreeDoc(xml);
- xmlKeepBlanksDefault(keepBlanksDefault);
- return ret;
-}
-
-
/* Struct and callback function used as a hash table callback; each call
* appends another snapshot XML to buf, with the caller clearing the
* buffer if any callback fails. */
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index bf5625fbf4..03b4db98fe 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1001,7 +1001,6 @@ virDomainSnapshotObjListFree;
virDomainSnapshotObjListGetNames;
virDomainSnapshotObjListNew;
virDomainSnapshotObjListNum;
-virDomainSnapshotObjListParse;
virDomainSnapshotObjListRemove;
virDomainSnapshotObjListRemoveAll;
virDomainSnapshotSetCurrent;
--=20
2.20.1
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
From nobody Sat Apr 27 07:25:42 2024
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
Return-Path:
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by
mx.zohomail.com
with SMTPS id 1553580862127926.6306371021715;
Mon, 25 Mar 2019 23:14:22 -0700 (PDT)
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 mx1.redhat.com (Postfix) with ESMTPS id A55913D3A;
Tue, 26 Mar 2019 06:14:20 +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 719325F9CF;
Tue, 26 Mar 2019 06:14:20 +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 24B39180338C;
Tue, 26 Mar 2019 06:14:20 +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 x2Q6Dx48001304 for ;
Tue, 26 Mar 2019 02:13:59 -0400
Received: by smtp.corp.redhat.com (Postfix)
id C91987DA38; Tue, 26 Mar 2019 06:13:59 +0000 (UTC)
Received: from blue.redhat.com (ovpn-116-59.phx2.redhat.com [10.3.116.59])
by smtp.corp.redhat.com (Postfix) with ESMTP id 409735C232;
Tue, 26 Mar 2019 06:13:59 +0000 (UTC)
From: Eric Blake
To: libvir-list@redhat.com
Date: Tue, 26 Mar 2019 01:13:46 -0500
Message-Id: <20190326061353.7206-3-eblake@redhat.com>
In-Reply-To: <20190326061353.7206-1-eblake@redhat.com>
References: <20190326061353.7206-1-eblake@redhat.com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16
X-loop: libvir-list@redhat.com
Cc: nsoffer@redhat.com, jsnow@redhat.com
Subject: [libvirt] [PATCH v6 2/9] Revert "snapshot: Add
virDomainSnapshotObjListFormat"
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.16
X-Greylist: Sender IP whitelisted,
not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]);
Tue, 26 Mar 2019 06:14:21 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
This reverts commit 86c0ed6f70268dfa7c3bba95a0ba96fcfe2ab039, and
subsequent refactorings of the function into new files. There are no
callers of this function - I had originally proposed it for
implementing a new bulk snapshot API, but that proved to be too
invasive given RPC limits. I also tried using it for streamlining how
the qemu driver stores snapshot state across libvirtd restarts
internally, but in the end, the risks of a new internal format
outweighed the benefits of one file per snapshot.
Signed-off-by: Eric Blake
Reviewed-by: Daniel P. Berrang=C3=A9
Reviewed-by: J=C3=A1n Tomko
---
src/conf/snapshot_conf.h | 7 ----
src/conf/virdomainsnapshotobjlist.h | 7 ----
src/conf/snapshot_conf.c | 2 +-
src/conf/virdomainsnapshotobjlist.c | 61 -----------------------------
src/libvirt_private.syms | 1 -
5 files changed, 1 insertion(+), 77 deletions(-)
diff --git a/src/conf/snapshot_conf.h b/src/conf/snapshot_conf.h
index d082ffbad0..cc8f384bf7 100644
--- a/src/conf/snapshot_conf.h
+++ b/src/conf/snapshot_conf.h
@@ -119,13 +119,6 @@ char *virDomainSnapshotDefFormat(const char *uuidstr,
virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
unsigned int flags);
-int virDomainSnapshotDefFormatInternal(virBufferPtr buf,
- const char *uuidstr,
- virDomainSnapshotDefPtr def,
- virCapsPtr caps,
- virDomainXMLOptionPtr xmlopt,
- unsigned int flags);
-
int virDomainSnapshotAlignDisks(virDomainSnapshotDefPtr snapshot,
int default_snapshot,
bool require_match);
diff --git a/src/conf/virdomainsnapshotobjlist.h b/src/conf/virdomainsnapsh=
otobjlist.h
index 626cdcafa7..38d34ea010 100644
--- a/src/conf/virdomainsnapshotobjlist.h
+++ b/src/conf/virdomainsnapshotobjlist.h
@@ -30,13 +30,6 @@
virDomainSnapshotObjListPtr virDomainSnapshotObjListNew(void);
void virDomainSnapshotObjListFree(virDomainSnapshotObjListPtr snapshots);
-int virDomainSnapshotObjListFormat(virBufferPtr buf,
- const char *uuidstr,
- virDomainSnapshotObjListPtr snapshots,
- virCapsPtr caps,
- virDomainXMLOptionPtr xmlopt,
- unsigned int flags);
-
virDomainMomentObjPtr virDomainSnapshotAssignDef(virDomainSnapshotObjListP=
tr snapshots,
virDomainSnapshotDefPtr d=
ef);
diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c
index cc3f71ab6f..4ce120451e 100644
--- a/src/conf/snapshot_conf.c
+++ b/src/conf/snapshot_conf.c
@@ -787,7 +787,7 @@ virDomainSnapshotDiskDefFormat(virBufferPtr buf,
/* Append XML describing def into buf. Return 0 on success, or -1 on
* failure with buf cleared. */
-int
+static int
virDomainSnapshotDefFormatInternal(virBufferPtr buf,
const char *uuidstr,
virDomainSnapshotDefPtr def,
diff --git a/src/conf/virdomainsnapshotobjlist.c b/src/conf/virdomainsnapsh=
otobjlist.c
index 20f4ff22f2..04221134da 100644
--- a/src/conf/virdomainsnapshotobjlist.c
+++ b/src/conf/virdomainsnapshotobjlist.c
@@ -39,67 +39,6 @@ struct _virDomainSnapshotObjList {
};
-/* Struct and callback function used as a hash table callback; each call
- * appends another snapshot XML to buf, with the caller clearing the
- * buffer if any callback fails. */
-struct virDomainSnapshotFormatData {
- virBufferPtr buf;
- const char *uuidstr;
- virCapsPtr caps;
- virDomainXMLOptionPtr xmlopt;
- unsigned int flags;
-};
-
-static int
-virDomainSnapshotFormatOne(void *payload,
- const void *name ATTRIBUTE_UNUSED,
- void *opaque)
-{
- virDomainMomentObjPtr snap =3D payload;
- struct virDomainSnapshotFormatData *data =3D opaque;
- return virDomainSnapshotDefFormatInternal(data->buf, data->uuidstr,
- virDomainSnapshotObjGetDef(s=
nap),
- data->caps, data->xmlopt,
- data->flags);
-}
-
-
-/* Format the XML for all snapshots in the list into buf. @flags is
- * virDomainSnapshotFormatFlags. On error, clear the buffer and return
- * -1. */
-int
-virDomainSnapshotObjListFormat(virBufferPtr buf,
- const char *uuidstr,
- virDomainSnapshotObjListPtr snapshots,
- virCapsPtr caps,
- virDomainXMLOptionPtr xmlopt,
- unsigned int flags)
-{
- struct virDomainSnapshotFormatData data =3D {
- .buf =3D buf,
- .uuidstr =3D uuidstr,
- .caps =3D caps,
- .xmlopt =3D xmlopt,
- .flags =3D flags,
- };
-
- virCheckFlags(VIR_DOMAIN_SNAPSHOT_FORMAT_SECURE, -1);
- virBufferAddLit(buf, "\n");
- virBufferAdjustIndent(buf, 2);
- if (virDomainSnapshotForEach(snapshots, virDomainSnapshotFormatOne,
- &data) < 0) {
- virBufferFreeAndReset(buf);
- return -1;
- }
- virBufferAdjustIndent(buf, -2);
- virBufferAddLit(buf, "\n");
- return 0;
-}
-
-
virDomainMomentObjPtr
virDomainSnapshotAssignDef(virDomainSnapshotObjListPtr snapshots,
virDomainSnapshotDefPtr def)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 03b4db98fe..80abbfd0ce 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -996,7 +996,6 @@ virDomainSnapshotForEach;
virDomainSnapshotGetCurrent;
virDomainSnapshotGetCurrentName;
virDomainSnapshotIsCurrentName;
-virDomainSnapshotObjListFormat;
virDomainSnapshotObjListFree;
virDomainSnapshotObjListGetNames;
virDomainSnapshotObjListNew;
--=20
2.20.1
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
From nobody Sat Apr 27 07:25:42 2024
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
Return-Path:
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by
mx.zohomail.com
with SMTPS id 1553580861699901.9947447080807;
Mon, 25 Mar 2019 23:14:21 -0700 (PDT)
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 mx1.redhat.com (Postfix) with ESMTPS id A552A81112;
Tue, 26 Mar 2019 06:14:20 +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 70DD990CC0;
Tue, 26 Mar 2019 06:14:20 +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 24A2B3FB16;
Tue, 26 Mar 2019 06:14:20 +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 x2Q6E0iE001311 for ;
Tue, 26 Mar 2019 02:14:00 -0400
Received: by smtp.corp.redhat.com (Postfix)
id 96F1E7DA40; Tue, 26 Mar 2019 06:14:00 +0000 (UTC)
Received: from blue.redhat.com (ovpn-116-59.phx2.redhat.com [10.3.116.59])
by smtp.corp.redhat.com (Postfix) with ESMTP id EC5435C232;
Tue, 26 Mar 2019 06:13:59 +0000 (UTC)
From: Eric Blake
To: libvir-list@redhat.com
Date: Tue, 26 Mar 2019 01:13:47 -0500
Message-Id: <20190326061353.7206-4-eblake@redhat.com>
In-Reply-To: <20190326061353.7206-1-eblake@redhat.com>
References: <20190326061353.7206-1-eblake@redhat.com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16
X-loop: libvir-list@redhat.com
Cc: nsoffer@redhat.com, jsnow@redhat.com
Subject: [libvirt] [PATCH v6 3/9] snapshot: Various doc tweaks
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.13
X-Greylist: Sender IP whitelisted,
not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]);
Tue, 26 Mar 2019 06:14:21 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
Since I was copying this text to form checkpoint XML and API
documentation, I might as well make improvements along the way. Most
of these changes are based on reviews of the checkpoint docs.
Among other things: grammar tweaks, point to a single source of
documentation rather than repeating verbosity, reword things for
easier legibility.
Signed-off-by: Eric Blake
Reviewed-by: Daniel P. Berrang=C3=A9
---
docs/formatsnapshot.html.in | 80 ++++++------
src/libvirt-domain-snapshot.c | 222 +++++++---------------------------
2 files changed, 89 insertions(+), 213 deletions(-)
diff --git a/docs/formatsnapshot.html.in b/docs/formatsnapshot.html.in
index 146908ce76..1bbbf06205 100644
--- a/docs/formatsnapshot.html.in
+++ b/docs/formatsnapshot.html.in
@@ -99,16 +99,14 @@
name
-
The name for this snapshot. If the name is specified when
- initially creating the snapshot, then the snapshot will have
- that particular name. If the name is omitted when initially
- creating the snapshot, then libvirt will make up a name for
- the snapshot, based on the time when it was created.
+
The optional name for this snapshot. If the name is
+ omitted, libvirt will create a name based on the time of the
+ creation.
description
-
A human-readable description of the snapshot. If the
- description is omitted when initially creating the snapshot,
- then this field will be empty.
+
An optional human-readable description of the snapshot. If
+ the description is omitted when initially creating the
+ snapshot, then this field will be empty.
memory
On input, this is an optional request for how to handle VM
@@ -200,46 +198,52 @@
creationTime
-
The time this snapshot was created. The time is specified
- in seconds since the Epoch, UTC (i.e. Unix time). Readonly.
+
A readonly representation of the time this snapshot was
+ created. The time is specified in seconds since the Epoch,
+ UTC (i.e. Unix time).
state
-
The state of the domain at the time this snapshot was taken.
- If a full system snapshot was created, then this
- is the state of the domain at that time. When the domain is
- reverted to this snapshot, the domain's state will default to
- this state, unless overridden
+
A readonly representation of the state of the domain at the
+ time this snapshot was taken. If a full system snapshot was
+ created, then this is the state of the domain at that
+ time. When the domain is reverted to this snapshot, the
+ domain's state will default to this state, unless overridden
by virDomainRevertToSnapshot() flags to revert to
- a running or paused state. Additionally,
- this field can be the value "disk-snapshot"
- (since 0.9.5) when it represents
- only a disk snapshot (no VM memory state), and reverting to this
- snapshot will default to an inactive guest. Readonly.
+ a running or paused state. Additionally, this field can be the
+ value "disk-snapshot" (since 0.9.5)
+ when it represents only a disk snapshot (no VM memory state),
+ and reverting to this snapshot will default to an inactive
+ guest.
parent
-
The parent of this snapshot. If present, this element
- contains exactly one child element, name. This specifies the
- name of the parent snapshot of this snapshot, and is used to
- represent trees of snapshots. Readonly.
+
An optional readonly representation of the parent of this
+ snapshot. If present, this element contains exactly one child
+ element, name. This specifies the name of the
+ parent snapshot of this snapshot, and is used to represent
+ trees of snapshots.
domain
-
The domain that this snapshot was taken against. Older
- versions of libvirt stored only a single child element, uuid;
- reverting to a snapshot like this is risky if the current
- state of the domain differs from the state that the domain was
- created in, and requires the use of the
- VIR_DOMAIN_SNAPSHOT_REVERT_FORCE flag
+
A readonly representation of the domain that this snapshot
+ was taken against. Older versions of libvirt stored only a
+ single child element, uuid; reverting to a snapshot like this
+ is risky if the current state of the domain differs from the
+ state that the domain was created in, and requires the use of
+ the VIR_DOMAIN_SNAPSHOT_REVERT_FORCE flag
in virDomainRevertToSnapshot(). Newer versions
- of libvirt (since 0.9.5) store the en=
tire
- inactive domain configuration
- at the time of the snapshot (since
- 0.9.5). Readonly.
+ of libvirt (since 0.9.5) store the
+ entire inactive domain
+ configuration at the time of the snapshot
+ (since 0.9.5). The domain will have
+ security-sensitive information omitted
+ unless the flag VIR_DOMAIN_SNAPSHOT_XML_SECURE is
+ provided on a read-write connection.
cookie
-
Save image cookie containing additional data libvirt may need to
- properly restore a domain from an active snapshot when such data
- cannot be stored directly in the domain to maintain
- compatibility with older libvirt or hypervisor. Readonly.
+
An optional readonly representation of a save image cookie
+ containing additional data libvirt may need to properly
+ restore a domain from an active snapshot when such data cannot
+ be stored directly in the domain to maintain
+ compatibility with older libvirt or hypervisor.
diff --git a/src/libvirt-domain-snapshot.c b/src/libvirt-domain-snapshot.c
index be9bf71af9..0c8023d9f6 100644
--- a/src/libvirt-domain-snapshot.c
+++ b/src/libvirt-domain-snapshot.c
@@ -142,8 +142,10 @@ virDomainSnapshotGetConnect(virDomainSnapshotPtr snaps=
hot)
* support these flags.
*
* If @flags includes VIR_DOMAIN_SNAPSHOT_CREATE_NO_METADATA, then the
- * domain's disk images are modified according to @xmlDesc, but then
- * the just-created snapshot has its metadata deleted. This flag is
+ * domain's disk images are modified according to @xmlDesc, but
+ * libvirt does not track any metadata (similar to immediately calling
+ * virDomainSnapshotDelete() with
+ * VIR_DOMAIN_SNAPSHOT_DELETE_METADATA_ONLY). This flag is
* incompatible with VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE.
*
* If @flags includes VIR_DOMAIN_SNAPSHOT_CREATE_HALT, then the domain
@@ -203,7 +205,8 @@ virDomainSnapshotGetConnect(virDomainSnapshotPtr snapsh=
ot)
* virDomainSnapshotFree should be used to free the resources after the
* snapshot object is no longer needed.
*
- * Returns an (opaque) virDomainSnapshotPtr on success, NULL on failure.
+ * Returns an (opaque) new virDomainSnapshotPtr on success or NULL on
+ * failure.
*/
virDomainSnapshotPtr
virDomainSnapshotCreateXML(virDomainPtr domain,
@@ -260,7 +263,7 @@ virDomainSnapshotCreateXML(virDomainPtr domain,
* VIR_DOMAIN_SNAPSHOT_XML_SECURE; this flag is rejected on read-only
* connections.
*
- * Returns a 0 terminated UTF-8 encoded XML instance, or NULL in case
+ * Returns a 0 terminated UTF-8 encoded XML instance or NULL in case
* of error. The caller must free() the returned value.
*/
char *
@@ -308,37 +311,11 @@ virDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snap=
shot,
* @flags only if virDomainSnapshotListNames() can honor it, although
* the flag has no other effect here.
*
- * By default, this command covers all snapshots; it is also possible to
- * limit things to just snapshots with no parents, when @flags includes
- * VIR_DOMAIN_SNAPSHOT_LIST_ROOTS. Additional filters are provided in
- * groups, where each group contains bits that describe mutually exclusive
- * attributes of a snapshot, and where all bits within a group describe
- * all possible snapshots. Some hypervisors might reject explicit bits
- * from a group where the hypervisor cannot make a distinction. For a
- * group supported by a given hypervisor, the behavior when no bits of a
- * group are set is identical to the behavior when all bits in that group
- * are set. When setting bits from more than one group, it is possible to
- * select an impossible combination, in that case a hypervisor may return
- * either 0 or an error.
- *
- * The first group of @flags is VIR_DOMAIN_SNAPSHOT_LIST_LEAVES and
- * VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES, to filter based on snapshots that
- * have no further children (a leaf snapshot).
- *
- * The next group of @flags is VIR_DOMAIN_SNAPSHOT_LIST_METADATA and
- * VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA, for filtering snapshots based on
- * whether they have metadata that would prevent the removal of the last
- * reference to a domain.
- *
- * The next group of @flags is VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE,
- * VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE, and VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY,
- * for filtering snapshots based on what domain state is tracked by the
- * snapshot.
- *
- * The next group of @flags is VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL and
- * VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL, for filtering snapshots based on
- * whether the snapshot is stored inside the disk images or as
- * additional files.
+ * By default, this command covers all snapshots. It is also possible
+ * to limit things to just snapshots with no parents, when @flags
+ * includes VIR_DOMAIN_SNAPSHOT_LIST_ROOTS. Additional filters are
+ * provided via the same @flags values as documented in
+ * virDomainListAllSnapshots().
*
* Returns the number of domain snapshots found or -1 in case of error.
*/
@@ -386,37 +363,11 @@ virDomainSnapshotNum(virDomainPtr domain, unsigned in=
t flags)
* starting from that earlier snapshot; otherwise, the order of
* snapshots in the resulting list is unspecified.
*
- * By default, this command covers all snapshots; it is also possible to
- * limit things to just snapshots with no parents, when @flags includes
- * VIR_DOMAIN_SNAPSHOT_LIST_ROOTS. Additional filters are provided in
- * groups, where each group contains bits that describe mutually exclusive
- * attributes of a snapshot, and where all bits within a group describe
- * all possible snapshots. Some hypervisors might reject explicit bits
- * from a group where the hypervisor cannot make a distinction. For a
- * group supported by a given hypervisor, the behavior when no bits of a
- * group are set is identical to the behavior when all bits in that group
- * are set. When setting bits from more than one group, it is possible to
- * select an impossible combination, in that case a hypervisor may return
- * either 0 or an error.
- *
- * The first group of @flags is VIR_DOMAIN_SNAPSHOT_LIST_LEAVES and
- * VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES, to filter based on snapshots that
- * have no further children (a leaf snapshot).
- *
- * The next group of @flags is VIR_DOMAIN_SNAPSHOT_LIST_METADATA and
- * VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA, for filtering snapshots based on
- * whether they have metadata that would prevent the removal of the last
- * reference to a domain.
- *
- * The next group of @flags is VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE,
- * VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE, and VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY,
- * for filtering snapshots based on what domain state is tracked by the
- * snapshot.
- *
- * The next group of @flags is VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL and
- * VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL, for filtering snapshots based on
- * whether the snapshot is stored inside the disk images or as
- * additional files.
+ * By default, this command covers all snapshots. It is also possible
+ * to limit things to just snapshots with no parents, when @flags
+ * includes VIR_DOMAIN_SNAPSHOT_LIST_ROOTS. Additional filters are
+ * provided via the same @flags values as documented in
+ * virDomainListAllSnapshots().
*
* Note that this command is inherently racy: another connection can
* define a new snapshot between a call to virDomainSnapshotNum() and
@@ -465,12 +416,12 @@ virDomainSnapshotListNames(virDomainPtr domain, char =
**names, int nameslen,
/**
* virDomainListAllSnapshots:
* @domain: a domain object
- * @snaps: pointer to variable to store the array containing snapshot obje=
cts,
+ * @snaps: pointer to variable to store the array containing snapshot obje=
cts
* or NULL if the list is not required (just returns number of
* snapshots)
* @flags: bitwise-OR of supported virDomainSnapshotListFlags
*
- * Collect the list of domain snapshots for the given domain, and allocate
+ * Collect the list of domain snapshots for the given domain and allocate
* an array to store those objects. This API solves the race inherent in
* virDomainSnapshotListNames().
*
@@ -482,18 +433,15 @@ virDomainSnapshotListNames(virDomainPtr domain, char =
**names, int nameslen,
* otherwise, the order of snapshots in the resulting list is
* unspecified.
*
- * By default, this command covers all snapshots; it is also possible to
- * limit things to just snapshots with no parents, when @flags includes
- * VIR_DOMAIN_SNAPSHOT_LIST_ROOTS. Additional filters are provided in
- * groups, where each group contains bits that describe mutually exclusive
- * attributes of a snapshot, and where all bits within a group describe
- * all possible snapshots. Some hypervisors might reject explicit bits
- * from a group where the hypervisor cannot make a distinction. For a
- * group supported by a given hypervisor, the behavior when no bits of a
- * group are set is identical to the behavior when all bits in that group
- * are set. When setting bits from more than one group, it is possible to
- * select an impossible combination, in that case a hypervisor may return
- * either 0 or an error.
+ * By default, this command covers all snapshots. It is also possible
+ * to limit things to just snapshots with no parents, when @flags
+ * includes VIR_DOMAIN_SNAPSHOT_LIST_ROOTS. Additional filters are
+ * provided in groups listed below. Within a group, bits are mutually
+ * exclusive, where all possible snapshots are described by exactly
+ * one bit from the group. Some hypervisors might reject particular
+ * flags where it cannot make a distinction for filtering. If the set
+ * of filter flags selected forms an impossible combination, the
+ * hypervisor may return either 0 or an error.
*
* The first group of @flags is VIR_DOMAIN_SNAPSHOT_LIST_LEAVES and
* VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES, to filter based on snapshots that
@@ -562,37 +510,11 @@ virDomainListAllSnapshots(virDomainPtr domain, virDom=
ainSnapshotPtr **snaps,
* @flags only if virDomainSnapshotListChildrenNames() can honor it,
* although the flag has no other effect here.
*
- * By default, this command covers only direct children; it is also possib=
le
- * to expand things to cover all descendants, when @flags includes
- * VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS. Also, some filters are provided =
in
- * groups, where each group contains bits that describe mutually exclusive
- * attributes of a snapshot, and where all bits within a group describe
- * all possible snapshots. Some hypervisors might reject explicit bits
- * from a group where the hypervisor cannot make a distinction. For a
- * group supported by a given hypervisor, the behavior when no bits of a
- * group are set is identical to the behavior when all bits in that group
- * are set. When setting bits from more than one group, it is possible to
- * select an impossible combination, in that case a hypervisor may return
- * either 0 or an error.
- *
- * The first group of @flags is VIR_DOMAIN_SNAPSHOT_LIST_LEAVES and
- * VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES, to filter based on snapshots that
- * have no further children (a leaf snapshot).
- *
- * The next group of @flags is VIR_DOMAIN_SNAPSHOT_LIST_METADATA and
- * VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA, for filtering snapshots based on
- * whether they have metadata that would prevent the removal of the last
- * reference to a domain.
- *
- * The next group of @flags is VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE,
- * VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE, and VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY,
- * for filtering snapshots based on what domain state is tracked by the
- * snapshot.
- *
- * The next group of @flags is VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL and
- * VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL, for filtering snapshots based on
- * whether the snapshot is stored inside the disk images or as
- * additional files.
+ * By default, this command covers only direct children. It is also
+ * possible to expand things to cover all descendants, when @flags
+ * includes VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS. Additional filters
+ * are provided via the same @flags values as documented in
+ * virDomainSnapshotListAllChildren().
*
* Returns the number of domain snapshots found or -1 in case of error.
*/
@@ -642,39 +564,12 @@ virDomainSnapshotNumChildren(virDomainSnapshotPtr sna=
pshot, unsigned int flags)
* earlier snapshot; otherwise, the order of snapshots in the
* resulting list is unspecified.
*
- * By default, this command covers only direct children; it is also possib=
le
- * to expand things to cover all descendants, when @flags includes
- * VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS. Also, some filters are provided =
in
- * groups, where each group contains bits that describe mutually exclusive
- * attributes of a snapshot, and where all bits within a group describe
- * all possible snapshots. Some hypervisors might reject explicit bits
- * from a group where the hypervisor cannot make a distinction. For a
- * group supported by a given hypervisor, the behavior when no bits of a
- * group are set is identical to the behavior when all bits in that group
- * are set. When setting bits from more than one group, it is possible to
- * select an impossible combination, in that case a hypervisor may return
- * either 0 or an error.
+ * By default, this command covers only direct children. It is also
+ * possible to expand things to cover all descendants, when @flags
+ * includes VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS. Additional filters
+ * are provided via the same @flags values as documented in
+ * virDomainSnapshotListAllChildren().
*
- * The first group of @flags is VIR_DOMAIN_SNAPSHOT_LIST_LEAVES and
- * VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES, to filter based on snapshots that
- * have no further children (a leaf snapshot).
- *
- * The next group of @flags is VIR_DOMAIN_SNAPSHOT_LIST_METADATA and
- * VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA, for filtering snapshots based on
- * whether they have metadata that would prevent the removal of the last
- * reference to a domain.
- *
- * The next group of @flags is VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE,
- * VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE, and VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY,
- * for filtering snapshots based on what domain state is tracked by the
- * snapshot.
- *
- * The next group of @flags is VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL and
- * VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL, for filtering snapshots based on
- * whether the snapshot is stored inside the disk images or as
- * additional files.
- *
- * Returns the number of domain snapshots found or -1 in case of error.
* Note that this command is inherently racy: another connection can
* define a new snapshot between a call to virDomainSnapshotNumChildren()
* and this call. You are only guaranteed that all currently defined
@@ -725,7 +620,7 @@ virDomainSnapshotListChildrenNames(virDomainSnapshotPtr=
snapshot,
/**
* virDomainSnapshotListAllChildren:
* @snapshot: a domain snapshot object
- * @snaps: pointer to variable to store the array containing snapshot obje=
cts,
+ * @snaps: pointer to variable to store the array containing snapshot obje=
cts
* or NULL if the list is not required (just returns number of
* snapshots)
* @flags: bitwise-OR of supported virDomainSnapshotListFlags
@@ -742,37 +637,14 @@ virDomainSnapshotListChildrenNames(virDomainSnapshotP=
tr snapshot,
* starting from that earlier snapshot; otherwise, the order of
* snapshots in the resulting list is unspecified.
*
- * By default, this command covers only direct children; it is also possib=
le
- * to expand things to cover all descendants, when @flags includes
- * VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS. Also, some filters are provided =
in
- * groups, where each group contains bits that describe mutually exclusive
- * attributes of a snapshot, and where all bits within a group describe
- * all possible snapshots. Some hypervisors might reject explicit bits
- * from a group where the hypervisor cannot make a distinction. For a
- * group supported by a given hypervisor, the behavior when no bits of a
- * group are set is identical to the behavior when all bits in that group
- * are set. When setting bits from more than one group, it is possible to
- * select an impossible combination, in that case a hypervisor may return
- * either 0 or an error.
- *
- * The first group of @flags is VIR_DOMAIN_SNAPSHOT_LIST_LEAVES and
- * VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES, to filter based on snapshots that
- * have no further children (a leaf snapshot).
- *
- * The next group of @flags is VIR_DOMAIN_SNAPSHOT_LIST_METADATA and
- * VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA, for filtering snapshots based on
- * whether they have metadata that would prevent the removal of the last
- * reference to a domain.
- *
- * The next group of @flags is VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE,
- * VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE, and VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY,
- * for filtering snapshots based on what domain state is tracked by the
- * snapshot.
- *
- * The next group of @flags is VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL and
- * VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL, for filtering snapshots based on
- * whether the snapshot is stored inside the disk images or as
- * additional files.
+ * By default, this command covers only direct children. It is also
+ * possible to expand things to cover all descendants, when @flags
+ * includes VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS. Additional filters
+ * are provided via the remaining @flags values as documented in
+ * virDomainListAllSnapshots(), with the exception that
+ * VIR_DOMAIN_SNAPSHOT_LIST_ROOTS is not supported (in fact,
+ * VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS has the same bit value but
+ * opposite semantics of widening rather than narrowing the listing).
*
* Returns the number of domain snapshots found or -1 and sets @snaps to
* NULL in case of error. On success, the array stored into @snaps is
--=20
2.20.1
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
From nobody Sat Apr 27 07:25:42 2024
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
Return-Path:
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by
mx.zohomail.com
with SMTPS id 1553580848967984.0769241849077;
Mon, 25 Mar 2019 23:14:08 -0700 (PDT)
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 mx1.redhat.com (Postfix) with ESMTPS id 657C0356CE;
Tue, 26 Mar 2019 06:14:07 +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 379DF100164A;
Tue, 26 Mar 2019 06:14:07 +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 C96AF3FB10;
Tue, 26 Mar 2019 06:14:06 +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 x2Q6E4UH001324 for ;
Tue, 26 Mar 2019 02:14:04 -0400
Received: by smtp.corp.redhat.com (Postfix)
id F2AFE7DA40; Tue, 26 Mar 2019 06:14:03 +0000 (UTC)
Received: from blue.redhat.com (ovpn-116-59.phx2.redhat.com [10.3.116.59])
by smtp.corp.redhat.com (Postfix) with ESMTP id 6B0CB5F9CF;
Tue, 26 Mar 2019 06:14:03 +0000 (UTC)
From: Eric Blake
To: libvir-list@redhat.com
Date: Tue, 26 Mar 2019 01:13:48 -0500
Message-Id: <20190326061353.7206-5-eblake@redhat.com>
In-Reply-To: <20190326061353.7206-1-eblake@redhat.com>
References: <20190326061353.7206-1-eblake@redhat.com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16
X-loop: libvir-list@redhat.com
Cc: nsoffer@redhat.com, jsnow@redhat.com
Subject: [libvirt] [PATCH v6 4/9] backup: Introduce virDomainCheckpointPtr
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.84 on 10.5.11.22
X-Greylist: Sender IP whitelisted,
not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]);
Tue, 26 Mar 2019 06:14:08 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
Prepare for introducing a bunch of new public APIs related to
backup checkpoints by first introducing a new internal type
and errors associated with that type. Checkpoints are modeled
heavily after virDomainSnapshotPtr (both represent a point in
time of the guest), although a snapshot exists with the intent
of rolling back to that state, while a checkpoint exists to
make it possible to create an incremental backup at a later
time.
Signed-off-by: Eric Blake
Reviewed-by: John Ferlan
Reviewed-by: Daniel P. Berrang=C3=A9
---
include/libvirt/virterror.h | 7 +++--
src/util/virerror.c | 12 ++++++-
include/libvirt/libvirt.h | 6 +++-
src/datatypes.h | 33 ++++++++++++++++++-
src/datatypes.c | 63 ++++++++++++++++++++++++++++++++++++-
src/libvirt_private.syms | 2 ++
6 files changed, 117 insertions(+), 6 deletions(-)
diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h
index 3c19ff5e2e..6dc83a17cc 100644
--- a/include/libvirt/virterror.h
+++ b/include/libvirt/virterror.h
@@ -4,7 +4,7 @@
* Description: Provides the interfaces of the libvirt library to handle
* errors raised while using the library.
*
- * Copyright (C) 2006-2016 Red Hat, Inc.
+ * Copyright (C) 2006-2019 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -132,6 +132,7 @@ typedef enum {
VIR_FROM_LIBSSH =3D 66, /* Error from libssh connection transpor=
t */
VIR_FROM_RESCTRL =3D 67, /* Error from resource control */
VIR_FROM_FIREWALLD =3D 68, /* Error from firewalld */
+ VIR_FROM_DOMAIN_CHECKPOINT =3D 69, /* Error from domain checkpoint */
# ifdef VIR_ENUM_SENTINELS
VIR_ERR_DOMAIN_LAST
@@ -322,11 +323,13 @@ typedef enum {
VIR_ERR_DEVICE_MISSING =3D 99, /* fail to find the desired devi=
ce */
VIR_ERR_INVALID_NWFILTER_BINDING =3D 100, /* invalid nwfilter binding=
*/
VIR_ERR_NO_NWFILTER_BINDING =3D 101, /* no nwfilter binding */
+ VIR_ERR_INVALID_DOMAIN_CHECKPOINT =3D 102, /* invalid domain checkpoin=
t */
+ VIR_ERR_NO_DOMAIN_CHECKPOINT =3D 103, /* domain checkpoint not found */
+ VIR_ERR_NO_DOMAIN_BACKUP =3D 104, /* domain backup job id not foun=
d */
# ifdef VIR_ENUM_SENTINELS
VIR_ERR_NUMBER_LAST
# endif
-
} virErrorNumber;
/**
diff --git a/src/util/virerror.c b/src/util/virerror.c
index 91a513160f..05e535d859 100644
--- a/src/util/virerror.c
+++ b/src/util/virerror.c
@@ -1,7 +1,7 @@
/*
* virerror.c: error handling and reporting code for libvirt
*
- * Copyright (C) 2006, 2008-2016 Red Hat, Inc.
+ * Copyright (C) 2006-2019 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -139,6 +139,7 @@ VIR_ENUM_IMPL(virErrorDomain, VIR_ERR_DOMAIN_LAST,
"Libssh transport layer",
"Resource control",
"FirewallD",
+ "Domain Checkpoint",
);
@@ -1214,6 +1215,15 @@ const virErrorMsgTuple virErrorMsgStrings[VIR_ERR_NU=
MBER_LAST] =3D {
[VIR_ERR_NO_NWFILTER_BINDING] =3D {
N_("Network filter binding not found"),
N_("Network filter binding not found: %s") },
+ [VIR_ERR_INVALID_DOMAIN_CHECKPOINT] =3D {
+ N_("Invalid domain checkpoint"),
+ N_("Invalid domain checkpoint: %s") },
+ [VIR_ERR_NO_DOMAIN_CHECKPOINT] =3D {
+ N_("Domain checkpoint not found"),
+ N_("Domain checkpoint not found: %s") },
+ [VIR_ERR_NO_DOMAIN_BACKUP] =3D {
+ N_("Domain backup job id not found"),
+ N_("Domain backup job id not found: %s") },
};
diff --git a/include/libvirt/libvirt.h b/include/libvirt/libvirt.h
index 20e5d276a7..13de151cb6 100644
--- a/include/libvirt/libvirt.h
+++ b/include/libvirt/libvirt.h
@@ -4,7 +4,7 @@
* Description: Provides the interfaces of the libvirt library to handle
* virtualized domains
*
- * Copyright (C) 2005-2006, 2010-2014 Red Hat, Inc.
+ * Copyright (C) 2005-2019 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -34,6 +34,10 @@ extern "C" {
# include
# include
# include
+/* FIXME: Temporary hack until later patch creates new
+ * libvirt-domain-checkpoint.h file */
+typedef struct _virDomainCheckpoint virDomainCheckpoint;
+typedef virDomainCheckpoint *virDomainCheckpointPtr;
# include
# include
# include
diff --git a/src/datatypes.h b/src/datatypes.h
index 12015679f3..87f3d5e095 100644
--- a/src/datatypes.h
+++ b/src/datatypes.h
@@ -1,7 +1,7 @@
/*
* datatypes.h: management of structs for public data types
*
- * Copyright (C) 2006-2015 Red Hat, Inc.
+ * Copyright (C) 2006-2019 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -31,6 +31,7 @@
extern virClassPtr virConnectClass;
extern virClassPtr virDomainClass;
+extern virClassPtr virDomainCheckpointClass;
extern virClassPtr virDomainSnapshotClass;
extern virClassPtr virInterfaceClass;
extern virClassPtr virNetworkClass;
@@ -292,6 +293,21 @@ extern virClassPtr virAdmClientClass;
} \
} while (0)
+# define virCheckDomainCheckpointReturn(obj, retval) \
+ do { \
+ virDomainCheckpointPtr _check =3D (obj); \
+ if (!virObjectIsClass(_check, virDomainCheckpointClass) || \
+ !virObjectIsClass(_check->domain, virDomainClass) || \
+ !virObjectIsClass(_check->domain->conn, virConnectClass)) { \
+ virReportErrorHelper(VIR_FROM_DOMAIN_CHECKPOINT, \
+ VIR_ERR_INVALID_DOMAIN_CHECKPOINT, \
+ __FILE__, __FUNCTION__, __LINE__, \
+ __FUNCTION__); \
+ virDispatchError(NULL); \
+ return retval; \
+ } \
+ } while (0)
+
# define virCheckDomainSnapshotReturn(obj, retval) \
do { \
virDomainSnapshotPtr _snap =3D (obj); \
@@ -668,6 +684,19 @@ struct _virStream {
virFreeCallback ff;
};
+
+/**
+ * _virDomainCheckpoint
+ *
+ * Internal structure associated with a domain checkpoint
+ */
+struct _virDomainCheckpoint {
+ virObject parent;
+ char *name;
+ virDomainPtr domain;
+};
+
+
/**
* _virDomainSnapshot
*
@@ -744,6 +773,8 @@ virNWFilterPtr virGetNWFilter(virConnectPtr conn,
virNWFilterBindingPtr virGetNWFilterBinding(virConnectPtr conn,
const char *portdev,
const char *filtername);
+virDomainCheckpointPtr virGetDomainCheckpoint(virDomainPtr domain,
+ const char *name);
virDomainSnapshotPtr virGetDomainSnapshot(virDomainPtr domain,
const char *name);
diff --git a/src/datatypes.c b/src/datatypes.c
index 9b92d892d5..14ad5442fd 100644
--- a/src/datatypes.c
+++ b/src/datatypes.c
@@ -1,7 +1,7 @@
/*
* datatypes.c: management of structs for public data types
*
- * Copyright (C) 2006-2015 Red Hat, Inc.
+ * Copyright (C) 2006-2019 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -36,6 +36,7 @@ VIR_LOG_INIT("datatypes");
virClassPtr virConnectClass;
virClassPtr virConnectCloseCallbackDataClass;
virClassPtr virDomainClass;
+virClassPtr virDomainCheckpointClass;
virClassPtr virDomainSnapshotClass;
virClassPtr virInterfaceClass;
virClassPtr virNetworkClass;
@@ -50,6 +51,7 @@ virClassPtr virStoragePoolClass;
static void virConnectDispose(void *obj);
static void virConnectCloseCallbackDataDispose(void *obj);
static void virDomainDispose(void *obj);
+static void virDomainCheckpointDispose(void *obj);
static void virDomainSnapshotDispose(void *obj);
static void virInterfaceDispose(void *obj);
static void virNetworkDispose(void *obj);
@@ -86,6 +88,7 @@ virDataTypesOnceInit(void)
DECLARE_CLASS_LOCKABLE(virConnect);
DECLARE_CLASS_LOCKABLE(virConnectCloseCallbackData);
DECLARE_CLASS(virDomain);
+ DECLARE_CLASS(virDomainCheckpoint);
DECLARE_CLASS(virDomainSnapshot);
DECLARE_CLASS(virInterface);
DECLARE_CLASS(virNetwork);
@@ -900,6 +903,64 @@ virNWFilterBindingDispose(void *obj)
}
+/**
+ * virGetDomainCheckpoint:
+ * @domain: the domain to checkpoint
+ * @name: pointer to the domain checkpoint name
+ *
+ * Allocates a new domain checkpoint object. When the object is no longer =
needed,
+ * virObjectUnref() must be called in order to not leak data.
+ *
+ * Returns a pointer to the domain checkpoint object, or NULL on error.
+ */
+virDomainCheckpointPtr
+virGetDomainCheckpoint(virDomainPtr domain,
+ const char *name)
+{
+ virDomainCheckpointPtr ret =3D NULL;
+
+ if (virDataTypesInitialize() < 0)
+ return NULL;
+
+ virCheckDomainGoto(domain, error);
+ virCheckNonNullArgGoto(name, error);
+
+ if (!(ret =3D virObjectNew(virDomainCheckpointClass)))
+ goto error;
+ if (VIR_STRDUP(ret->name, name) < 0)
+ goto error;
+
+ ret->domain =3D virObjectRef(domain);
+
+ return ret;
+
+ error:
+ virObjectUnref(ret);
+ return NULL;
+}
+
+
+/**
+ * virDomainCheckpointDispose:
+ * @obj: the domain checkpoint to release
+ *
+ * Unconditionally release all memory associated with a checkpoint.
+ * The checkpoint object must not be used once this method returns.
+ *
+ * It will also unreference the associated connection object,
+ * which may also be released if its ref count hits zero.
+ */
+static void
+virDomainCheckpointDispose(void *obj)
+{
+ virDomainCheckpointPtr checkpoint =3D obj;
+ VIR_DEBUG("release checkpoint %p %s", checkpoint, checkpoint->name);
+
+ VIR_FREE(checkpoint->name);
+ virObjectUnref(checkpoint->domain);
+}
+
+
/**
* virGetDomainSnapshot:
* @domain: the domain to snapshot
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 80abbfd0ce..9c2d5e75fa 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1252,10 +1252,12 @@ virConnectCloseCallbackDataClass;
virConnectCloseCallbackDataGetCallback;
virConnectCloseCallbackDataRegister;
virConnectCloseCallbackDataUnregister;
+virDomainCheckpointClass;
virDomainClass;
virDomainSnapshotClass;
virGetConnect;
virGetDomain;
+virGetDomainCheckpoint;
virGetDomainSnapshot;
virGetInterface;
virGetNetwork;
--=20
2.20.1
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
From nobody Sat Apr 27 07:25:42 2024
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
Return-Path:
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by
mx.zohomail.com
with SMTPS id 1553580865991689.1834854544037;
Mon, 25 Mar 2019 23:14:25 -0700 (PDT)
Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com
[10.5.11.23])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id 640D2356F1;
Tue, 26 Mar 2019 06:14: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 37FCD26381;
Tue, 26 Mar 2019 06:14: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 F09493FAF5;
Tue, 26 Mar 2019 06:14: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 x2Q6E4Nu001334 for ;
Tue, 26 Mar 2019 02:14:04 -0400
Received: by smtp.corp.redhat.com (Postfix)
id C08CF7DA40; Tue, 26 Mar 2019 06:14:04 +0000 (UTC)
Received: from blue.redhat.com (ovpn-116-59.phx2.redhat.com [10.3.116.59])
by smtp.corp.redhat.com (Postfix) with ESMTP id 22F235C232;
Tue, 26 Mar 2019 06:14:04 +0000 (UTC)
From: Eric Blake
To: libvir-list@redhat.com
Date: Tue, 26 Mar 2019 01:13:49 -0500
Message-Id: <20190326061353.7206-6-eblake@redhat.com>
In-Reply-To: <20190326061353.7206-1-eblake@redhat.com>
References: <20190326061353.7206-1-eblake@redhat.com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16
X-loop: libvir-list@redhat.com
Cc: nsoffer@redhat.com, jsnow@redhat.com
Subject: [libvirt] [PATCH v6 5/9] backup: Document new XML for checkpoints
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.84 on 10.5.11.23
X-Greylist: Sender IP whitelisted,
not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]);
Tue, 26 Mar 2019 06:14:25 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
Prepare for new checkpoint APIs by describing the XML that will
represent a checkpoint. The checkpoint XML is modeled heavily after
virDomainSnapshotPtr. (See the docs for more details).
Add testsuite coverage for some minimal uses of the XML.
Signed-off-by: Eric Blake
Reviewed-by: Daniel P. Berrang=C3=A9
---
docs/docs.html.in | 3 +-
docs/format.html.in | 1 +
docs/formatcheckpoint.html.in | 202 ++++++++++++++++++++
docs/index.html.in | 3 +-
docs/schemas/domaincheckpoint.rng | 94 +++++++++
libvirt.spec.in | 1 +
mingw-libvirt.spec.in | 2 +
tests/Makefile.am | 2 +
tests/domaincheckpointxml2xmlin/empty.xml | 1 +
tests/domaincheckpointxml2xmlin/sample.xml | 7 +
tests/domaincheckpointxml2xmlout/empty.xml | 10 +
tests/domaincheckpointxml2xmlout/sample.xml | 16 ++
tests/virschematest.c | 2 +
13 files changed, 342 insertions(+), 2 deletions(-)
create mode 100644 docs/formatcheckpoint.html.in
create mode 100644 docs/schemas/domaincheckpoint.rng
create mode 100644 tests/domaincheckpointxml2xmlin/empty.xml
create mode 100644 tests/domaincheckpointxml2xmlin/sample.xml
create mode 100644 tests/domaincheckpointxml2xmlout/empty.xml
create mode 100644 tests/domaincheckpointxml2xmlout/sample.xml
diff --git a/docs/docs.html.in b/docs/docs.html.in
index d0ff844d0c..f6e599b77b 100644
--- a/docs/docs.html.in
+++ b/docs/docs.html.in
@@ -80,7 +80,8 @@
storage pool capabilities,
node devices,
secrets,
- snapshots
+ One method of capturing domain disk backups is via the use of
+ incremental backups. Right now, incremental backups are only
+ supported for the QEMU hypervisor when using qcow2 disks at the
+ active layer; if other disk formats are in use, capturing disk
+ backups requires different libvirt APIs.
+
+
+ Libvirt is able to facilitate incremental backups by tracking
+ disk checkpoints, which are points in time against which it is
+ easy to compute which portion of the disk has changed. Given a
+ full backup (a backup created from the creation of the disk to a
+ given point in time), coupled with the creation of a disk
+ checkpoint at that time, and an incremental backup (a backup
+ created from just the dirty portion of the disk between the
+ first checkpoint and the second backup operation), it is
+ possible to do an offline reconstruction of the state of the
+ disk at the time of the second backup without having to copy as
+ much data as a second full backup would require. Most disk
+ checkpoints are created in conjunction with a backup
+ via virDomainBackupBegin() or with a snapshot
+ via virDomainSnapshotCreateXML2; however, libvirt
+ also exposes enough support to create disk checkpoints
+ independently from a backup operation
+ via virDomainCheckpointCreateXML().
+
+
+ Attributes of libvirt checkpoints are stored as child elements
+ of the domaincheckpoint element. At checkpoint
+ creation time, normally only
+ the name, description,
+ and disks elements are settable. The rest of the
+ fields are ignored on creation and will be filled in by libvirt
+ in for informational purposes
+ by virDomainCheckpointGetXMLDesc(). However, when
+ redefining a checkpoint, with
+ the VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE flag
+ of virDomainCheckpointCreateXML(), all of the XML
+ fields described here are relevant on input, even the fields
+ that are normally described as readonly for output.
+
+
+ Checkpoints are maintained in a hierarchy. A domain can have a
+ current checkpoint, which is the most recent checkpoint compared
+ to the current state of the domain (although a domain might have
+ checkpoints without a current checkpoint, if checkpoints have
+ been deleted in the meantime). Creating a checkpoint sets that
+ checkpoint as current and the prior current checkpoint is the
+ parent of the new checkpoint. In the future, reverting to a
+ domain snapshot may also affect the current checkpoint.
+
+
+ The top-level domaincheckpoint element may contain
+ the following elements:
+
+
+
name
+
The optional name for this checkpoint. If the name is
+ omitted, libvirt will create a name based on the time of the
+ creation.
+
+
description
+
An optional human-readable description of the checkpoint.
+ If the description is omitted when initially creating the
+ checkpoint, then this field will be empty.
+
+
disks
+
On input, this is an optional listing of specific
+ instructions for disk checkpoints; it is needed when making a
+ checkpoint on only a subset of the disks associated with a
+ domain. In particular, since QEMU checkpoints require qcow2
+ disks, this element may be needed on input for excluding guest
+ disks that are not in qcow2 format. If the entire element was
+ omitted on input, then all disks participate in the
+ checkpoint, otherwise, only the disks explicitly listed which
+ do not also use checkpoint=3D'no' will
+ participate. On output, this is the checkpoint state of each
+ of the domain's disks.
+
+
disk
+
This sub-element describes the checkpoint properties of
+ a specific disk with the following attributes:
+
+
name
+
A mandatory attribute which must match either
+ the <target dev=3D'name'/> or an
+ unambiguous <source file=3D'name'/>
+ of one of
+ the disk
+ devices specified for the domain at the time of
+ the checkpoint.
+
checkpoint
+
An optional attribute; possible values
+ are no when the disk does not participate
+ in this checkpoint; or bitmap if the disk
+ will track all changes since the creation of this
+ checkpoint via a bitmap.
+
bitmap
+
The attribute bitmap is only valid
+ if checkpoint=3D'bitmap'; it describes the
+ name of the tracking bitmap (defaulting to the
+ checkpoint name).
+
size
+
The attribute size is ignored on input;
+ on output, it is only present if
+ the VIR_DOMAIN_CHECKPOINT_XML_SIZE flag
+ was used to perform a dynamic query of the estimated
+ size in bytes of the changes made since the checkpoint
+ was created.
+
+
+
+
+
creationTime
+
A readonly representation of the time this checkpoint was
+ created. The time is specified in seconds since the Epoch,
+ UTC (i.e. Unix time).
+
+
parent
+
An optional readonly representation of the parent of this
+ checkpoint. If present, this element contains exactly one
+ child element, name.
+
+
domain
+
A readonly representation of the
+ inactive domain configuration
+ at the time the checkpoint was created. This element may be
+ omitted for output brevity by supplying
+ the VIR_DOMAIN_CHECKPOINT_XML_NO_DOMAIN flag, but
+ the resulting XML is no longer viable for use with
+ the VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE flag
+ of virDomainCheckpointCreateXML(). The domain
+ will have security-sensitive information omitted unless the
+ flag VIR_DOMAIN_SNAPSHOT_XML_SECURE is provided
+ on a read-write connection.
+
With that checkpoint created, the qcow2 image is now tracking
+ all changes that occur in the image since the checkpoint via
+ the persistent bitmap named 1525889631.
+