]> xenbits.xensource.com Git - libvirt.git/commit
qemu: backup: Install bitmap for incremental backup to appropriate node only
authorPeter Krempa <pkrempa@redhat.com>
Tue, 10 Nov 2020 07:55:03 +0000 (08:55 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 16 Nov 2020 13:12:38 +0000 (14:12 +0100)
commit0316c28a453ac15f58c61f30359f66ab9a649884
treee2c81bcc73db4e430b917d5c92a2d1c8be44db93
parent6f30d7003a26cfd4e5fe9357abc9877cb5f393f3
qemu: backup: Install bitmap for incremental backup to appropriate node only

Libvirt's backup code has two modes:

1) push - where qemu actively writes the difference since the checkpoint
          into the output file

2) pull - where we instruct qemu to expose a frozen disk state along
          with a bitmap of blocks which changed since the checkpoint

For push mode qemu needs the temporary bitmap we use where we calculate
the actual changes to be present on the block node backing the disk.

For pull mode where we expose the bitmap via NBD qemu actually wants the
bitmap to be present for the exported block node which is the scratch
file.

Until now we've calculated the bitmap twice and installed it both to the
scratch file and to the disk node, but we don't need to since we know
when it's needed.

Pass in the 'pull' flag and decide where to install the bitmap according
to it and also when to register the bitmap name with the blockjob.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
src/qemu/qemu_backup.c