]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: block: Add validator for bitmap chains accross backing chains
authorPeter Krempa <pkrempa@redhat.com>
Wed, 29 Jan 2020 11:08:50 +0000 (12:08 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 4 Feb 2020 12:45:33 +0000 (13:45 +0100)
commit41c7e5c2a689a4ad091cec40b61beeeb3dde49b8
tree3dec20f83e0b21d478bc6c40c9f6529b551da601
parentccd4228afff22214ea9b9199b2228d79a5cb5877
qemu: block: Add validator for bitmap chains accross backing chains

Add a validator which checks that a bitmap spanning multiple backing
chain members doesn't look broken. The current rules are that no
intermediate birmaps are missing (unfortunately it's hard to know
whether the topmost or bottommost bitmap is missing) and none of the
components is inconsistent.

We can obviously improve it over time.

The validator is also tested against the existing bitmap data we have
for the backup merging test as well as some of the existing broken
bitmap synthetic test cases.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_block.c
src/qemu/qemu_block.h
tests/qemublocktest.c