On 6/15/20 12:10 PM, Peter Krempa wrote:
In the 'basic case we have few bitmaps in only the top layer.
Simulate
stray or missing '
commit into the backing of the top layer and also 2 levels deep.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
tests/qemublocktest.c | 4 +
.../bitmapblockcommit/basic-1-2 | 145 ++++++++++++++++++
.../bitmapblockcommit/basic-1-3 | 145 ++++++++++++++++++
.../bitmapblockcommit/basic-2-3 | 1 +
4 files changed, 295 insertions(+)
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/basic-1-2
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/basic-1-3
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/basic-2-3
+++ b/tests/qemublocktestdata/bitmapblockcommit/basic-1-2
@@ -0,0 +1,145 @@
+merge bitmpas:
bitmaps (fixing the source of the typo probably has ripple effects in
expected output, and might even be in a prior patch...)
+[
+ {
+ "type": "block-dirty-bitmap-add",
+ "data": {
+ "node": "libvirt-2-format",
+ "name": "a",
+ "persistent": true,
+ "disabled": false,
+ "granularity": 65536
+ }
+ },
+ {
+ "type": "block-dirty-bitmap-merge",
+ "data": {
+ "node": "libvirt-2-format",
+ "target": "a",
+ "bitmaps": [
+ {
+ "node": "libvirt-1-format",
+ "name": "a"
+ },
+ {
+ "node": "libvirt-2-format",
+ "name": "libvirt-tmp-activewrite"
+ }
Hmm, so you are merging the 'libvirt-tmp-activewrite' bitmap into bitmap
(libvirt-2-format,a)...
+ ]
+ }
+ },
+ {
+ "type": "block-dirty-bitmap-add",
+ "data": {
+ "node": "libvirt-2-format",
+ "name": "b",
+ "persistent": true,
+ "disabled": false,
+ "granularity": 65536
+ }
+ },
+ {
+ "type": "block-dirty-bitmap-merge",
+ "data": {
+ "node": "libvirt-2-format",
+ "target": "b",
+ "bitmaps": [
+ {
+ "node": "libvirt-1-format",
+ "name": "b"
+ },
+ {
+ "node": "libvirt-2-format",
+ "name": "libvirt-tmp-activewrite"
...and (libvirt-2-format,b) simultaneously. But that still makes sense:
if libvirt-tmp-activewrite contains bits for everything that has changed
since a certain point in time, and both bitmap a and b will be left
active when the operation is done, they will both need those same bits
merged in.
It took me a while to see why you were reusing a bitmap as a source to
more than one destination, but it looks correct. With the typo fixed,
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