[libvirt] [RFC v3] external (pull) backup API

Eric Blake eblake at redhat.com
Fri May 25 15:26:12 UTC 2018


On 05/17/2018 05:43 PM, Eric Blake wrote:
> Here's my updated counterproposal for a backup API.
> 
> In comparison to v2 posted by Nikolay: 
> https://www.redhat.com/archives/libvir-list/2018-April/msg00115.html
> - changed terminology a bit: Nikolay's "BlockSnapshot" is now called a 
> "Checkpoint", and "BlockExportStart/Stop" is now "BackupBegin/End"
> - flesh out more API descriptions
> - better documentation of proposed XML, for both checkpoints and backup
> 
> Barring any major issues turned up during review, I've already starting 
> to code this into libvirt with a goal of getting an implementation ready 
> for review this month.
> 

> // Many additional functions copying heavily from virDomainSnapshot*:
> 
> virDomainCheckpointList(virDomainPtr domain,
>                          virDomainCheckpointPtr **checkpoints,
>                          unsigned int flags);
> 

> 
> int
> virDomainCheckpointListChildren(virDomainCheckpointPtr checkpoint,
>                                  virDomainCheckpointPtr **children,
>                                  unsigned int flags);
> 
> Notably, none of the older racy list functions, like
> virDomainSnapshotNum, virDomainSnapshotNumChildren, or
> virDomainSnapshotListChildrenNames; also, for now, there is no revert
> support like virDomainSnapshotRevert.

I'm finding it easier to understand if I name these:

virDomainListCheckpoints() (find checkpoints relative to a domain)
virDomainCheckpointListChildren() (find children relative to a checkpoint)

The counterpart Snapshot API used virDomainListAllSnapshots(); the term 
'All' was present because it was added after the initial racy 
virDomainSnapshotNum(), but as we are avoiding the racy API here we can 
skip it from the beginning.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org




More information about the libvir-list mailing list