[libvirt] [PATCH v7 06/23] backup: Introduce virDomainCheckpoint APIs

Daniel P. Berrangé berrange at redhat.com
Wed Mar 27 11:16:16 UTC 2019


On Wed, Mar 27, 2019 at 05:10:37AM -0500, Eric Blake wrote:
> Introduce a bunch of new public APIs related to backup checkpoints.
> 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.
> 
> The following map shows the API relations to snapshots, with new APIs
> on the right:
> 
> Operate on a domain object to create/redefine a child:
> virDomainSnapshotCreateXML          virDomainCheckpointCreateXML
> 
> Operate on a child object for lifetime management:
> virDomainSnapshotDelete             virDomainCheckpointDelete
> virDomainSnapshotFree               virDomainCheckpointFree
> virDomainSnapshotRef                virDomainCheckpointRef
> 
> Operate on a child object to learn more about it:
> virDomainSnapshotGetXMLDesc         virDomainCheckpointGetXMLDesc
> virDomainSnapshotGetConnect         virDomainCheckpointGetConnect
> virDomainSnapshotGetDomain          virDomainCheckpointGetDomain
> virDomainSnapshotGetName            virDomainCheckpiontGetName
> virDomainSnapshotGetParent          virDomainCheckpiontGetParent
> virDomainSnapshotHasMetadata        virDomainCheckpointHasMetadata
> virDomainSnapshotIsCurrent          virDomainCheckpointIsCurrent
> 
> Operate on a domain object to list all children:
> virDomainSnapshotNum                (no counterpart, this is the old
> virDomainSnapshotListNames           racy interface)
> virDomainSnapshotListAllSnapshots   virDomainListCheckpoints

s/virDomainListCheckpoints/virDomainListAllCheckpoints/

> 
> Operate on a child object to list descendents:
> virDomainSnapshotNumChildren        (no counterpart, this is the old
> virDomainSnapshotListChildrenNames   racy interface)
> virDomainSnapshotListAllChildren    virDomainCheckpointListChildren

s/virDomainCheckpointListChildren/virDomainCheckpointListAllChildren/

> Operate on a domain to locate a particular child:
> virDomainSnapshotLookupByName       virDomainCheckpointLookupByName
> virDomainHasCurrentSnapshot         virDomainHasCurrentCheckpoint
> virDomainSnapshotCurrent            virDomainCheckpointCurrent
> 
> Operate on a snapshot to roll back to earlier state:
> virDomainSnapshotRevert             (no counterpart, instead checkpoints
>                                      are used in incremental backups via
> 				     XML to virDomainBackupBegin)
> 
> Signed-off-by: Eric Blake <eblake at redhat.com>
> ---
>  include/libvirt/libvirt-domain-checkpoint.h | 161 +++++
>  include/libvirt/libvirt-domain.h            |   6 +
>  include/libvirt/libvirt.h                   |   5 +-
>  src/conf/virdomainmomentobjlist.h           |   5 +-
>  src/driver-hypervisor.h                     |  60 +-
>  docs/Makefile.am                            |   3 +
>  docs/apibuild.py                            |   2 +
>  docs/docs.html.in                           |   1 +
>  libvirt.spec.in                             |   1 +
>  mingw-libvirt.spec.in                       |   2 +
>  po/POTFILES                                 |   1 +
>  src/Makefile.am                             |   2 +
>  src/libvirt-domain-checkpoint.c             | 750 ++++++++++++++++++++
>  src/libvirt-domain.c                        |  18 +-
>  src/libvirt_public.syms                     |  16 +
>  15 files changed, 1023 insertions(+), 10 deletions(-)
>  create mode 100644 include/libvirt/libvirt-domain-checkpoint.h
>  create mode 100644 src/libvirt-domain-checkpoint.c

With the commit message fixed

Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>



Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list