On 3/11/20 7:56 AM, Peter Krempa wrote:
On start of the commit job, we need to disable any active bitmap in
the
base. Use qemuBlockBitmapsHandleCommitStart to calculate which and call
the appropriate QMP APIs. We use blockdev-reopen to make the 'base'
writable to disable the bitmaps.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_driver.c | 43 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 42 insertions(+), 1 deletion(-)
Someday, it would be nice if qemu let us do this without requiring us to
do the reopen step ourselves, but in the meantime, this looks like it
works. Design-wise, I'm still not convinced why we have to disable the
bitmaps in the base prior to the commit (as the only thing a bitmap is
good for is for cumulative merging in determining how much of an image
to expose over a future differential backup, but that differential is
the same whether we write bits in one or multiple bitmaps as part of the
commit operation). But code wise, this looks accurate.
Reviewed-by: Eric Blake <eblake(a)redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization:
qemu.org |
libvirt.org