On 6/15/20 12:10 PM, Peter Krempa wrote:
Reuse qemuBlockGetBitmapMergeActions which allows to remove the ad-hoc
s/allows to remove/allows the removal of/
implementatio of bitmap merging for block commit. The new approach is
implementation
way simpler and more robust and also allows us to get rid of the
disabling of bitmaps done prior to the start as we actually do want to
update the bitmaps in the base.
What if the commit fails, but we have merged in portions of the bitmap?
In practice, this merely means that a future attempt to use that bitmap
in the backing file will now copy more data than previously necessary;
what's more, if we try a commit again (if the failure was transient),
we'll be setting those same bits again. So yeah, I don't think it hurts
to not disable the bitmaps in the backing files.
Signed-off-by: Peter Krempa <[email protected]>
---
src/qemu/qemu_block.c | 203 +-----------------
src/qemu/qemu_block.h | 11 +-
src/qemu/qemu_blockjob.c | 25 ++-
src/qemu/qemu_driver.c | 56 +----
tests/qemublocktest.c | 18 +-
.../qemublocktestdata/bitmapblockcommit/empty | 1 -
6 files changed, 42 insertions(+), 272 deletions(-)
@@ -3332,95 +3222,20 @@ qemuBlockBitmapsHandleCommitFinishIterate(void *payload,
int
qemuBlockBitmapsHandleCommitFinish(virStorageSourcePtr topsrc,
virStorageSourcePtr basesrc,
+ bool active,
virHashTablePtr blockNamedNodeData,
- virJSONValuePtr *actions,
- char **disabledBitmapsBase)
+ virJSONValuePtr *actions)
{
Reviewed-by: Eric Blake <[email protected]>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org