Re: [RFC v3] external (pull) backup API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/17/2018 05:43 PM, Eric Blake wrote:
Here's my updated counterproposal for a backup API.


/**
  * virDomainBackupEnd:
  * @domain: a domain object
  * @id: the id of an active backup job previously started with
  *      virDomainBackupBegin()
  * @flags: bitwise-OR of supported virDomainBackupEndFlags
  *
  * Conclude a point-in-time backup job @id on the given domain.
  *
  * If the backup job uses the push model, but the event marking that
  * all data has been copied has not yet been emitted, then the command
  * fails unless @flags includes VIR_DOMAIN_BACKUP_END_ABORT.  If the
  * event has been issued, or if the backup uses the pull model, the
  * flag has no effect.
  *
  * Returns 0 on success and -1 on failure.
  */
int virDomainBackupEnd(virDomainPtr domain, int id, unsigned int flags);

For this API, I'm considering a tri-state return, 1 if the backup job completed successfully (in the push model, the backup destination file is usable); 0 if the backup job was aborted (only possible if VIR_DOMAIN_BACKUP_END_ABORT was passed, the backup destination file is untrustworthy); and -1 on failure.

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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux