[libvirt] [PATCH 00/21] Incremental backup support for qemu

Peter Krempa posted 21 patches 2 weeks ago
Failed in applying to current master (apply log)
docs/docs.html.in                             |    3 +-
docs/format.html.in                           |    1 +
docs/formatbackup.html.in                     |  161 +++
docs/formatcheckpoint.html.in                 |   12 +-
docs/index.html.in                            |    3 +-
docs/schemas/domainbackup.rng                 |  214 ++++
examples/c/misc/event-test.c                  |    3 +
include/libvirt/libvirt-domain.h              |   32 +-
libvirt.spec.in                               |    1 +
mingw-libvirt.spec.in                         |    2 +
po/POTFILES.in                                |    3 +
src/conf/Makefile.inc.am                      |    2 +
src/conf/backup_conf.c                        |  499 ++++++++
src/conf/backup_conf.h                        |  108 ++
src/conf/domain_conf.c                        |    2 +-
src/conf/virconftypes.h                       |    3 +
src/driver-hypervisor.h                       |   12 +
src/libvirt-domain-checkpoint.c               |    7 +-
src/libvirt-domain.c                          |  142 +++
src/libvirt_private.syms                      |    8 +
src/libvirt_public.syms                       |    6 +
src/qemu/Makefile.inc.am                      |    2 +
src/qemu/qemu_backup.c                        | 1017 +++++++++++++++++
src/qemu/qemu_backup.h                        |   46 +
src/qemu/qemu_blockjob.c                      |   96 +-
src/qemu/qemu_blockjob.h                      |   17 +
src/qemu/qemu_domain.c                        |  140 +++
src/qemu/qemu_domain.h                        |   14 +
src/qemu/qemu_driver.c                        |   68 +-
src/qemu/qemu_migration.c                     |    2 +
src/qemu/qemu_monitor.c                       |   13 +
src/qemu/qemu_monitor.h                       |   15 +
src/qemu/qemu_monitor_json.c                  |   33 +
src/qemu/qemu_monitor_json.h                  |    8 +
src/qemu/qemu_process.c                       |   25 +
src/remote/remote_driver.c                    |    2 +
src/remote/remote_protocol.x                  |   33 +-
src/remote_protocol-structs                   |   15 +
tests/Makefile.am                             |    3 +
tests/domainbackupxml2xmlin/backup-pull.xml   |    9 +
tests/domainbackupxml2xmlin/backup-push.xml   |    9 +
tests/domainbackupxml2xmlin/empty.xml         |    1 +
tests/domainbackupxml2xmlout/backup-pull.xml  |    9 +
tests/domainbackupxml2xmlout/backup-push.xml  |    9 +
tests/domainbackupxml2xmlout/empty.xml        |    7 +
tests/qemumonitorjsontest.c                   |    8 +-
.../qemustatusxml2xmldata/backup-pull-in.xml  |  607 ++++++++++
.../qemustatusxml2xmldata/backup-pull-out.xml |    1 +
tests/qemuxml2xmltest.c                       |    2 +
tests/virschematest.c                         |    2 +
tools/Makefile.am                             |    1 +
tools/virsh-backup.c                          |  144 +++
tools/virsh-backup.h                          |   21 +
tools/virsh-domain.c                          |   26 +-
tools/virsh.c                                 |    2 +
tools/virsh.h                                 |    1 +
tools/virsh.pod                               |   32 +
57 files changed, 3639 insertions(+), 25 deletions(-)
create mode 100644 docs/formatbackup.html.in
create mode 100644 docs/schemas/domainbackup.rng
create mode 100644 src/conf/backup_conf.c
create mode 100644 src/conf/backup_conf.h
create mode 100644 src/qemu/qemu_backup.c
create mode 100644 src/qemu/qemu_backup.h
create mode 100644 tests/domainbackupxml2xmlin/backup-pull.xml
create mode 100644 tests/domainbackupxml2xmlin/backup-push.xml
create mode 100644 tests/domainbackupxml2xmlin/empty.xml
create mode 100644 tests/domainbackupxml2xmlout/backup-pull.xml
create mode 100644 tests/domainbackupxml2xmlout/backup-push.xml
create mode 100644 tests/domainbackupxml2xmlout/empty.xml
create mode 100644 tests/qemustatusxml2xmldata/backup-pull-in.xml
create mode 120000 tests/qemustatusxml2xmldata/backup-pull-out.xml
create mode 100644 tools/virsh-backup.c
create mode 100644 tools/virsh-backup.h

[libvirt] [PATCH 00/21] Incremental backup support for qemu

Posted by Peter Krempa 2 weeks ago
This is a finished version of my RFC posted here:

https://www.redhat.com/archives/libvir-list/2019-October/msg01193.html

All cleanups of that series are now merged and this series has new
cleanups and depending patches that I posted earlier this week. For
convenience everything can be fetched at:

  git fetch https://gitlab.com/pipo.sk/libvirt.git blockdev-backup

This series requires qemu 4.2 to work properly. Please make sure to
fetch the current head.

Compared to previous versions:
- The API is similar to what was posted last time or in Eric's version
- the backup job ID was removed, this can't be integrated with qemu
  async jobs as there is only one async jobs.
- the virDomainBackupEnd API was removed as virDomainAbortJob can be
  used instead
- the usage of domain job APIs is fully implemented as it was documented
  in previous eric's postings
- the domain job completion event and completed job statistics are used
  to notify about the state and successful finishing of the job
  (see virDomainGetJobStats/virsh domjobinfo)
- unfortunately block jobs and snapshots are still not supported, thus
  this feature will stay disabled for now:

If you want to give the feature a spin you must use the following XML
override:

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
   ...
   <qemu:capabilities>
     <qemu:add capability='incremental-backup'/>
   </qemu:capabilities>
</domain>

Eric Blake (5):
  backup: Document new XML for backups
  backup: Introduce virDomainBackup APIs
  backup: Implement backup APIs for remote driver
  backup: Parse and output backup XML
  backup: Implement virsh support for backup

Peter Krempa (16):
  API: Introduce field for reporting temporary disk space usage of a
    domain job
  virsh: Implement VIR_DOMAIN_JOB_DISK_TEMP_(USED|TOTAL) in
    cmdDomjobinfo
  API: Add domain job operation for backups
  qemu: Add infrastructure for statistics of a backup job
  qemu: domain: Introduce QEMU_ASYNC_JOB_BACKUP async job type
  Add 'backup' block job type
  qemu: monitor: Add support for blockdev-backup via 'transaction'
  qemu: domain: Track backup job data in the status XML
  qemu: blockjob: Track internal data for 'backup' blockjob
  tests: qemustatusxml2xml: Add test for 'pull' type backup job
  conf: backup: Add fields for tracking stats of completed sub-jobs
  doc: Document quirk of getting block job info for a 'backup' blockjob
  qemu: Implement backup job APIs and qemu handling
  qemu: backup: Implement stats gathering while the job is running
  qemu: driver: Allow cancellation of the backup job
  qemu: blockjob: Implement concluded blockjob handler for backup
    blockjobs

 docs/docs.html.in                             |    3 +-
 docs/format.html.in                           |    1 +
 docs/formatbackup.html.in                     |  161 +++
 docs/formatcheckpoint.html.in                 |   12 +-
 docs/index.html.in                            |    3 +-
 docs/schemas/domainbackup.rng                 |  214 ++++
 examples/c/misc/event-test.c                  |    3 +
 include/libvirt/libvirt-domain.h              |   32 +-
 libvirt.spec.in                               |    1 +
 mingw-libvirt.spec.in                         |    2 +
 po/POTFILES.in                                |    3 +
 src/conf/Makefile.inc.am                      |    2 +
 src/conf/backup_conf.c                        |  499 ++++++++
 src/conf/backup_conf.h                        |  108 ++
 src/conf/domain_conf.c                        |    2 +-
 src/conf/virconftypes.h                       |    3 +
 src/driver-hypervisor.h                       |   12 +
 src/libvirt-domain-checkpoint.c               |    7 +-
 src/libvirt-domain.c                          |  142 +++
 src/libvirt_private.syms                      |    8 +
 src/libvirt_public.syms                       |    6 +
 src/qemu/Makefile.inc.am                      |    2 +
 src/qemu/qemu_backup.c                        | 1017 +++++++++++++++++
 src/qemu/qemu_backup.h                        |   46 +
 src/qemu/qemu_blockjob.c                      |   96 +-
 src/qemu/qemu_blockjob.h                      |   17 +
 src/qemu/qemu_domain.c                        |  140 +++
 src/qemu/qemu_domain.h                        |   14 +
 src/qemu/qemu_driver.c                        |   68 +-
 src/qemu/qemu_migration.c                     |    2 +
 src/qemu/qemu_monitor.c                       |   13 +
 src/qemu/qemu_monitor.h                       |   15 +
 src/qemu/qemu_monitor_json.c                  |   33 +
 src/qemu/qemu_monitor_json.h                  |    8 +
 src/qemu/qemu_process.c                       |   25 +
 src/remote/remote_driver.c                    |    2 +
 src/remote/remote_protocol.x                  |   33 +-
 src/remote_protocol-structs                   |   15 +
 tests/Makefile.am                             |    3 +
 tests/domainbackupxml2xmlin/backup-pull.xml   |    9 +
 tests/domainbackupxml2xmlin/backup-push.xml   |    9 +
 tests/domainbackupxml2xmlin/empty.xml         |    1 +
 tests/domainbackupxml2xmlout/backup-pull.xml  |    9 +
 tests/domainbackupxml2xmlout/backup-push.xml  |    9 +
 tests/domainbackupxml2xmlout/empty.xml        |    7 +
 tests/qemumonitorjsontest.c                   |    8 +-
 .../qemustatusxml2xmldata/backup-pull-in.xml  |  607 ++++++++++
 .../qemustatusxml2xmldata/backup-pull-out.xml |    1 +
 tests/qemuxml2xmltest.c                       |    2 +
 tests/virschematest.c                         |    2 +
 tools/Makefile.am                             |    1 +
 tools/virsh-backup.c                          |  144 +++
 tools/virsh-backup.h                          |   21 +
 tools/virsh-domain.c                          |   26 +-
 tools/virsh.c                                 |    2 +
 tools/virsh.h                                 |    1 +
 tools/virsh.pod                               |   32 +
 57 files changed, 3639 insertions(+), 25 deletions(-)
 create mode 100644 docs/formatbackup.html.in
 create mode 100644 docs/schemas/domainbackup.rng
 create mode 100644 src/conf/backup_conf.c
 create mode 100644 src/conf/backup_conf.h
 create mode 100644 src/qemu/qemu_backup.c
 create mode 100644 src/qemu/qemu_backup.h
 create mode 100644 tests/domainbackupxml2xmlin/backup-pull.xml
 create mode 100644 tests/domainbackupxml2xmlin/backup-push.xml
 create mode 100644 tests/domainbackupxml2xmlin/empty.xml
 create mode 100644 tests/domainbackupxml2xmlout/backup-pull.xml
 create mode 100644 tests/domainbackupxml2xmlout/backup-push.xml
 create mode 100644 tests/domainbackupxml2xmlout/empty.xml
 create mode 100644 tests/qemustatusxml2xmldata/backup-pull-in.xml
 create mode 120000 tests/qemustatusxml2xmldata/backup-pull-out.xml
 create mode 100644 tools/virsh-backup.c
 create mode 100644 tools/virsh-backup.h

-- 
2.23.0

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