[libvirt] [RFC PATCH 0/4] Add new function about block backup

John Snow jsnow at redhat.com
Wed Jun 8 22:24:35 UTC 2016



On 06/08/2016 02:21 AM, Rudy Zhang wrote:
> Add new function about block backup, it supports the drive-backup function
> in qemu, it supports three modes: full, top, incremental.
> 

Cheers Rudy!

I assume you've CC'd me as I authored a lot of the incremental backup
infrastructure in QEMU. I'm not qualified to review libvirt patches, so
I'm just going to offer some words of caution from the QEMU side:

(1) I didn't expect to see this integrated into libvirt yet as we aren't
quite 'finished' with the feature in its totality in QEMU.

(2) The specification for qcow2-backed bitmap persistence was merged in
QEMU 2.6, but the API for managing persistent dirty bitmap information
via QMP is still a WIP and could impact the design of the eventual
libvirt implementation.

(3) Migration of dirty bitmap information is also still a WIP. Our
migration strategy is still not really solidified.

I'm not sure if these features will hit QEMU 2.7 due to the short
development window, but we are fairly far along in design iterations for
these features and I expect them to be in 2.8.

I don't personally recommend any features be exposed to users prior to
the completion of bitmap persistence and migration, but don't let that
stop you from developing your own WIP in the meantime.

--js

> How to use it? As usual, we must do the full backup at first, if it's
> successfull, next time, we can do the incremental backup, because it has
> the bitmap to trace the dirty io. The incermental backup is faster.
> If backup fail at some time, we must do the full backup again, only in this
> way, we can keep the backup data correctly.
> 
> Rudy Zhang (4):
>   Introduce virDomainBlockBackup API
>   qemu drive support block backup.
>   virsh: support blockbackup in virsh command
>   libvirt-test: libvirt test supports drive-backup
> 
>  docs/apibuild.py                                   |   3 +-
>  include/libvirt/libvirt-domain.h                   |  15 ++
>  src/conf/domain_conf.h                             |  12 ++
>  src/driver-hypervisor.h                            |   9 +
>  src/libvirt-domain.c                               |  56 ++++++
>  src/libvirt_public.syms                            |   5 +
>  src/qemu/qemu_blockjob.c                           |   2 +
>  src/qemu/qemu_capabilities.c                       |   4 +
>  src/qemu/qemu_capabilities.h                       |   5 +
>  src/qemu/qemu_driver.c                             | 197 +++++++++++++++++++++
>  src/qemu/qemu_monitor.c                            |  59 ++++++
>  src/qemu/qemu_monitor.h                            |  23 +++
>  src/qemu/qemu_monitor_json.c                       | 124 +++++++++++++
>  src/qemu/qemu_monitor_json.h                       |  23 +++
>  src/remote/remote_driver.c                         |   1 +
>  src/remote/remote_protocol.x                       |  17 +-
>  src/remote_protocol-structs                        |   9 +
>  tests/qemucaps2xmldata/all_1.6.0-1.caps            |   1 +
>  tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.caps |   1 +
>  tools/virsh-domain.c                               | 149 ++++++++++++++++
>  20 files changed, 713 insertions(+), 2 deletions(-)
> 




More information about the libvir-list mailing list