[PATCH v2 00/25] Incremental backup support for qemu

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

 



Next version which includes feedback from V1:

https://www.redhat.com/archives/libvir-list/2019-November/msg01315.html

and also few features and bugs fixed based on offline requests:
- The flag VIR_DOMAIN_BACKUP_BEGIN_REUSE_EXTERNAL was added to
facilitate users who wish to provide their own files.
- The schema was fixed as many legitimate uses were not described:
    - format for the scratch file was not supported
    - security labels for the scratch file were not supported
    - tests were insufficient
- backup XML 2 XML testing was added
- scratch files created by libvirt are now removed after the job
finishes
- domain capability feature entry was added
- the code for determining bitmaps for incremental backup was slightly
 optimized
- documentation now documents our behaviour towards the scratch file and
the relationship to the new flag.

I might have forgotten to apply some reviewed-by tags though. I'm sorry
for that. Most patches changed though (including the API patches which
add the flag) so a review is welcome even there.

You can fetch the new version at:

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

Note that the branch also contains commit to enable block commit for
easier testing. With the posted code the following approach can be
used to enable it (new qemu required):

<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 (20):
  qemu: domain: Export qemuDomainGetImageIds
  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
  tests: genericxml2xml: Add testing of backup XML files
  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
  conf: domaincaps: Add 'backup' feature flag
  qemu: Add support for VIR_DOMAIN_CAPS_FEATURE_BACKUP

 docs/docs.html.in                             |    3 +-
 docs/format.html.in                           |    1 +
 docs/formatbackup.html.in                     |  175 +++
 docs/formatcheckpoint.html.in                 |   12 +-
 docs/formatdomaincaps.html.in                 |    8 +
 docs/index.html.in                            |    3 +-
 docs/schemas/domainbackup.rng                 |  223 ++++
 docs/schemas/domaincaps.rng                   |    9 +
 examples/c/misc/event-test.c                  |    3 +
 include/libvirt/libvirt-domain.h              |   37 +-
 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_capabilities.c                |    1 +
 src/conf/domain_capabilities.h                |    1 +
 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                          |  147 +++
 src/libvirt_private.syms                      |    8 +
 src/libvirt_public.syms                       |    6 +
 src/qemu/Makefile.inc.am                      |    2 +
 src/qemu/qemu_backup.c                        | 1039 +++++++++++++++++
 src/qemu/qemu_backup.h                        |   46 +
 src/qemu/qemu_blockjob.c                      |  111 +-
 src/qemu/qemu_blockjob.h                      |   19 +
 src/qemu/qemu_capabilities.c                  |    1 +
 src/qemu/qemu_domain.c                        |  150 ++-
 src/qemu/qemu_domain.h                        |   21 +
 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                             |    2 +
 .../backup-pull-seclabel.xml                  |   18 +
 tests/domainbackupxml2xmlin/backup-pull.xml   |   10 +
 .../backup-push-seclabel.xml                  |   17 +
 tests/domainbackupxml2xmlin/backup-push.xml   |   10 +
 tests/domainbackupxml2xmlin/empty.xml         |    1 +
 .../backup-pull-seclabel.xml                  |   18 +
 tests/domainbackupxml2xmlout/backup-pull.xml  |   10 +
 .../backup-push-seclabel.xml                  |   17 +
 tests/domainbackupxml2xmlout/backup-push.xml  |   10 +
 tests/domainbackupxml2xmlout/empty.xml        |    1 +
 .../domaincapsdata/qemu_1.5.3-q35.x86_64.xml  |    1 +
 .../domaincapsdata/qemu_1.5.3-tcg.x86_64.xml  |    1 +
 tests/domaincapsdata/qemu_1.5.3.x86_64.xml    |    1 +
 .../domaincapsdata/qemu_1.6.0-q35.x86_64.xml  |    1 +
 .../domaincapsdata/qemu_1.6.0-tcg.x86_64.xml  |    1 +
 tests/domaincapsdata/qemu_1.6.0.x86_64.xml    |    1 +
 .../domaincapsdata/qemu_1.7.0-q35.x86_64.xml  |    1 +
 .../domaincapsdata/qemu_1.7.0-tcg.x86_64.xml  |    1 +
 tests/domaincapsdata/qemu_1.7.0.x86_64.xml    |    1 +
 .../domaincapsdata/qemu_2.1.1-q35.x86_64.xml  |    1 +
 .../domaincapsdata/qemu_2.1.1-tcg.x86_64.xml  |    1 +
 tests/domaincapsdata/qemu_2.1.1.x86_64.xml    |    1 +
 .../domaincapsdata/qemu_2.10.0-q35.x86_64.xml |    1 +
 .../domaincapsdata/qemu_2.10.0-tcg.x86_64.xml |    1 +
 .../qemu_2.10.0-virt.aarch64.xml              |    1 +
 tests/domaincapsdata/qemu_2.10.0.aarch64.xml  |    1 +
 tests/domaincapsdata/qemu_2.10.0.ppc64.xml    |    1 +
 tests/domaincapsdata/qemu_2.10.0.s390x.xml    |    1 +
 tests/domaincapsdata/qemu_2.10.0.x86_64.xml   |    1 +
 .../domaincapsdata/qemu_2.11.0-q35.x86_64.xml |    1 +
 .../domaincapsdata/qemu_2.11.0-tcg.x86_64.xml |    1 +
 tests/domaincapsdata/qemu_2.11.0.s390x.xml    |    1 +
 tests/domaincapsdata/qemu_2.11.0.x86_64.xml   |    1 +
 .../domaincapsdata/qemu_2.12.0-q35.x86_64.xml |    1 +
 .../domaincapsdata/qemu_2.12.0-tcg.x86_64.xml |    1 +
 .../qemu_2.12.0-virt.aarch64.xml              |    1 +
 tests/domaincapsdata/qemu_2.12.0.aarch64.xml  |    1 +
 tests/domaincapsdata/qemu_2.12.0.ppc64.xml    |    1 +
 tests/domaincapsdata/qemu_2.12.0.s390x.xml    |    1 +
 tests/domaincapsdata/qemu_2.12.0.x86_64.xml   |    1 +
 .../domaincapsdata/qemu_2.4.0-q35.x86_64.xml  |    1 +
 .../domaincapsdata/qemu_2.4.0-tcg.x86_64.xml  |    1 +
 tests/domaincapsdata/qemu_2.4.0.x86_64.xml    |    1 +
 .../domaincapsdata/qemu_2.5.0-q35.x86_64.xml  |    1 +
 .../domaincapsdata/qemu_2.5.0-tcg.x86_64.xml  |    1 +
 tests/domaincapsdata/qemu_2.5.0.x86_64.xml    |    1 +
 .../domaincapsdata/qemu_2.6.0-q35.x86_64.xml  |    1 +
 .../domaincapsdata/qemu_2.6.0-tcg.x86_64.xml  |    1 +
 .../qemu_2.6.0-virt.aarch64.xml               |    1 +
 tests/domaincapsdata/qemu_2.6.0.aarch64.xml   |    1 +
 tests/domaincapsdata/qemu_2.6.0.ppc64.xml     |    1 +
 tests/domaincapsdata/qemu_2.6.0.x86_64.xml    |    1 +
 .../domaincapsdata/qemu_2.7.0-q35.x86_64.xml  |    1 +
 .../domaincapsdata/qemu_2.7.0-tcg.x86_64.xml  |    1 +
 tests/domaincapsdata/qemu_2.7.0.s390x.xml     |    1 +
 tests/domaincapsdata/qemu_2.7.0.x86_64.xml    |    1 +
 .../domaincapsdata/qemu_2.8.0-q35.x86_64.xml  |    1 +
 .../domaincapsdata/qemu_2.8.0-tcg.x86_64.xml  |    1 +
 tests/domaincapsdata/qemu_2.8.0.s390x.xml     |    1 +
 tests/domaincapsdata/qemu_2.8.0.x86_64.xml    |    1 +
 .../domaincapsdata/qemu_2.9.0-q35.x86_64.xml  |    1 +
 .../domaincapsdata/qemu_2.9.0-tcg.x86_64.xml  |    1 +
 tests/domaincapsdata/qemu_2.9.0.ppc64.xml     |    1 +
 tests/domaincapsdata/qemu_2.9.0.s390x.xml     |    1 +
 tests/domaincapsdata/qemu_2.9.0.x86_64.xml    |    1 +
 .../domaincapsdata/qemu_3.0.0-q35.x86_64.xml  |    1 +
 .../domaincapsdata/qemu_3.0.0-tcg.x86_64.xml  |    1 +
 tests/domaincapsdata/qemu_3.0.0.ppc64.xml     |    1 +
 tests/domaincapsdata/qemu_3.0.0.s390x.xml     |    1 +
 tests/domaincapsdata/qemu_3.0.0.x86_64.xml    |    1 +
 .../domaincapsdata/qemu_3.1.0-q35.x86_64.xml  |    1 +
 .../domaincapsdata/qemu_3.1.0-tcg.x86_64.xml  |    1 +
 tests/domaincapsdata/qemu_3.1.0.ppc64.xml     |    1 +
 tests/domaincapsdata/qemu_3.1.0.x86_64.xml    |    1 +
 .../domaincapsdata/qemu_4.0.0-q35.x86_64.xml  |    1 +
 .../domaincapsdata/qemu_4.0.0-tcg.x86_64.xml  |    1 +
 .../qemu_4.0.0-virt.aarch64.xml               |    1 +
 tests/domaincapsdata/qemu_4.0.0.aarch64.xml   |    1 +
 tests/domaincapsdata/qemu_4.0.0.ppc64.xml     |    1 +
 tests/domaincapsdata/qemu_4.0.0.s390x.xml     |    1 +
 tests/domaincapsdata/qemu_4.0.0.x86_64.xml    |    1 +
 .../domaincapsdata/qemu_4.1.0-q35.x86_64.xml  |    1 +
 .../domaincapsdata/qemu_4.1.0-tcg.x86_64.xml  |    1 +
 tests/domaincapsdata/qemu_4.1.0.x86_64.xml    |    1 +
 .../domaincapsdata/qemu_4.2.0-q35.x86_64.xml  |    1 +
 .../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml  |    1 +
 .../qemu_4.2.0-virt.aarch64.xml               |    1 +
 tests/domaincapsdata/qemu_4.2.0.aarch64.xml   |    1 +
 tests/domaincapsdata/qemu_4.2.0.ppc64.xml     |    1 +
 tests/domaincapsdata/qemu_4.2.0.s390x.xml     |    1 +
 tests/domaincapsdata/qemu_4.2.0.x86_64.xml    |    1 +
 tests/genericxml2xmltest.c                    |   46 +
 tests/qemumonitorjsontest.c                   |    8 +-
 .../qemustatusxml2xmldata/backup-pull-in.xml  |  608 ++++++++++
 .../qemustatusxml2xmldata/backup-pull-out.xml |    1 +
 tests/qemuxml2xmltest.c                       |    2 +
 tests/virschematest.c                         |    2 +
 tools/Makefile.am                             |    1 +
 tools/virsh-backup.c                          |  151 +++
 tools/virsh-backup.h                          |   21 +
 tools/virsh-domain.c                          |   26 +-
 tools/virsh.c                                 |    2 +
 tools/virsh.h                                 |    1 +
 tools/virsh.pod                               |   35 +
 148 files changed, 3952 insertions(+), 26 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-seclabel.xml
 create mode 100644 tests/domainbackupxml2xmlin/backup-pull.xml
 create mode 100644 tests/domainbackupxml2xmlin/backup-push-seclabel.xml
 create mode 100644 tests/domainbackupxml2xmlin/backup-push.xml
 create mode 100644 tests/domainbackupxml2xmlin/empty.xml
 create mode 100644 tests/domainbackupxml2xmlout/backup-pull-seclabel.xml
 create mode 100644 tests/domainbackupxml2xmlout/backup-pull.xml
 create mode 100644 tests/domainbackupxml2xmlout/backup-push-seclabel.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@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