|
|
b971b8 |
From 98ac7cbfb11dd6e5eadc88698f762cd9a48b4789 Mon Sep 17 00:00:00 2001
|
|
|
b971b8 |
Message-Id: <98ac7cbfb11dd6e5eadc88698f762cd9a48b4789@dist-git>
|
|
|
b971b8 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
b971b8 |
Date: Tue, 23 Jun 2020 12:24:05 +0200
|
|
|
b971b8 |
Subject: [PATCH] qemublocktest: Add test cases for handling bitmaps during
|
|
|
b971b8 |
block-copy
|
|
|
b971b8 |
MIME-Version: 1.0
|
|
|
b971b8 |
Content-Type: text/plain; charset=UTF-8
|
|
|
b971b8 |
Content-Transfer-Encoding: 8bit
|
|
|
b971b8 |
|
|
|
b971b8 |
Test both 'basic' and 'snapshots' cases on shallow and deep copy modes.
|
|
|
b971b8 |
|
|
|
b971b8 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
b971b8 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
b971b8 |
(cherry picked from commit 5f2fdcc867a08baa3d931cde895761bcbb45b7f6)
|
|
|
b971b8 |
https://bugzilla.redhat.com/show_bug.cgi?id=1804593
|
|
|
b971b8 |
Message-Id: <1f77aeac4a968c1115893226589b8d97f8a90838.1592906423.git.pkrempa@redhat.com>
|
|
|
b971b8 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
b971b8 |
---
|
|
|
b971b8 |
tests/qemublocktest.c | 5 +
|
|
|
b971b8 |
.../bitmapblockcopy/basic-deep-out.json | 144 ++++++++++++++
|
|
|
b971b8 |
.../bitmapblockcopy/basic-shallow-out.json | 144 ++++++++++++++
|
|
|
b971b8 |
.../bitmapblockcopy/snapshots-deep-out.json | 180 ++++++++++++++++++
|
|
|
b971b8 |
.../snapshots-shallow-out.json | 144 ++++++++++++++
|
|
|
b971b8 |
5 files changed, 617 insertions(+)
|
|
|
b971b8 |
create mode 100644 tests/qemublocktestdata/bitmapblockcopy/basic-deep-out.json
|
|
|
b971b8 |
create mode 100644 tests/qemublocktestdata/bitmapblockcopy/basic-shallow-out.json
|
|
|
b971b8 |
create mode 100644 tests/qemublocktestdata/bitmapblockcopy/snapshots-deep-out.json
|
|
|
b971b8 |
create mode 100644 tests/qemublocktestdata/bitmapblockcopy/snapshots-shallow-out.json
|
|
|
b971b8 |
|
|
|
b971b8 |
diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c
|
|
|
b971b8 |
index 193b4aaed0..758a7c1db0 100644
|
|
|
b971b8 |
--- a/tests/qemublocktest.c
|
|
|
b971b8 |
+++ b/tests/qemublocktest.c
|
|
|
b971b8 |
@@ -1345,6 +1345,11 @@ mymain(void)
|
|
|
b971b8 |
TEST_BITMAP_BLOCKCOPY("empty-shallow", true, "empty");
|
|
|
b971b8 |
TEST_BITMAP_BLOCKCOPY("empty-deep", false, "empty");
|
|
|
b971b8 |
|
|
|
b971b8 |
+ TEST_BITMAP_BLOCKCOPY("basic-shallow", true, "basic");
|
|
|
b971b8 |
+ TEST_BITMAP_BLOCKCOPY("basic-deep", false, "basic");
|
|
|
b971b8 |
+
|
|
|
b971b8 |
+ TEST_BITMAP_BLOCKCOPY("snapshots-shallow", true, "snapshots");
|
|
|
b971b8 |
+ TEST_BITMAP_BLOCKCOPY("snapshots-deep", false, "snapshots");
|
|
|
b971b8 |
|
|
|
b971b8 |
#define TEST_BITMAP_BLOCKCOMMIT(testname, topimg, baseimg, ndf) \
|
|
|
b971b8 |
do {\
|
|
|
b971b8 |
diff --git a/tests/qemublocktestdata/bitmapblockcopy/basic-deep-out.json b/tests/qemublocktestdata/bitmapblockcopy/basic-deep-out.json
|
|
|
b971b8 |
new file mode 100644
|
|
|
b971b8 |
index 0000000000..a8c2749879
|
|
|
b971b8 |
--- /dev/null
|
|
|
b971b8 |
+++ b/tests/qemublocktestdata/bitmapblockcopy/basic-deep-out.json
|
|
|
b971b8 |
@@ -0,0 +1,144 @@
|
|
|
b971b8 |
+[
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-add",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "a",
|
|
|
b971b8 |
+ "persistent": true,
|
|
|
b971b8 |
+ "disabled": false,
|
|
|
b971b8 |
+ "granularity": 65536
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "target": "a",
|
|
|
b971b8 |
+ "bitmaps": [
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-1-format",
|
|
|
b971b8 |
+ "name": "a"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ ]
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-add",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "b",
|
|
|
b971b8 |
+ "persistent": true,
|
|
|
b971b8 |
+ "disabled": false,
|
|
|
b971b8 |
+ "granularity": 65536
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "target": "b",
|
|
|
b971b8 |
+ "bitmaps": [
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-1-format",
|
|
|
b971b8 |
+ "name": "b"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ ]
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-add",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "c",
|
|
|
b971b8 |
+ "persistent": true,
|
|
|
b971b8 |
+ "disabled": false,
|
|
|
b971b8 |
+ "granularity": 65536
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "target": "c",
|
|
|
b971b8 |
+ "bitmaps": [
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-1-format",
|
|
|
b971b8 |
+ "name": "c"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ ]
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-add",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "d",
|
|
|
b971b8 |
+ "persistent": true,
|
|
|
b971b8 |
+ "disabled": false,
|
|
|
b971b8 |
+ "granularity": 65536
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "target": "d",
|
|
|
b971b8 |
+ "bitmaps": [
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-1-format",
|
|
|
b971b8 |
+ "name": "d"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ ]
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-add",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "current",
|
|
|
b971b8 |
+ "persistent": true,
|
|
|
b971b8 |
+ "disabled": false,
|
|
|
b971b8 |
+ "granularity": 65536
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "target": "current",
|
|
|
b971b8 |
+ "bitmaps": [
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-1-format",
|
|
|
b971b8 |
+ "name": "current"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ ]
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-remove",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+]
|
|
|
b971b8 |
diff --git a/tests/qemublocktestdata/bitmapblockcopy/basic-shallow-out.json b/tests/qemublocktestdata/bitmapblockcopy/basic-shallow-out.json
|
|
|
b971b8 |
new file mode 100644
|
|
|
b971b8 |
index 0000000000..a8c2749879
|
|
|
b971b8 |
--- /dev/null
|
|
|
b971b8 |
+++ b/tests/qemublocktestdata/bitmapblockcopy/basic-shallow-out.json
|
|
|
b971b8 |
@@ -0,0 +1,144 @@
|
|
|
b971b8 |
+[
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-add",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "a",
|
|
|
b971b8 |
+ "persistent": true,
|
|
|
b971b8 |
+ "disabled": false,
|
|
|
b971b8 |
+ "granularity": 65536
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "target": "a",
|
|
|
b971b8 |
+ "bitmaps": [
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-1-format",
|
|
|
b971b8 |
+ "name": "a"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ ]
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-add",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "b",
|
|
|
b971b8 |
+ "persistent": true,
|
|
|
b971b8 |
+ "disabled": false,
|
|
|
b971b8 |
+ "granularity": 65536
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "target": "b",
|
|
|
b971b8 |
+ "bitmaps": [
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-1-format",
|
|
|
b971b8 |
+ "name": "b"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ ]
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-add",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "c",
|
|
|
b971b8 |
+ "persistent": true,
|
|
|
b971b8 |
+ "disabled": false,
|
|
|
b971b8 |
+ "granularity": 65536
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "target": "c",
|
|
|
b971b8 |
+ "bitmaps": [
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-1-format",
|
|
|
b971b8 |
+ "name": "c"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ ]
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-add",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "d",
|
|
|
b971b8 |
+ "persistent": true,
|
|
|
b971b8 |
+ "disabled": false,
|
|
|
b971b8 |
+ "granularity": 65536
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "target": "d",
|
|
|
b971b8 |
+ "bitmaps": [
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-1-format",
|
|
|
b971b8 |
+ "name": "d"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ ]
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-add",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "current",
|
|
|
b971b8 |
+ "persistent": true,
|
|
|
b971b8 |
+ "disabled": false,
|
|
|
b971b8 |
+ "granularity": 65536
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "target": "current",
|
|
|
b971b8 |
+ "bitmaps": [
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-1-format",
|
|
|
b971b8 |
+ "name": "current"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ ]
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-remove",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+]
|
|
|
b971b8 |
diff --git a/tests/qemublocktestdata/bitmapblockcopy/snapshots-deep-out.json b/tests/qemublocktestdata/bitmapblockcopy/snapshots-deep-out.json
|
|
|
b971b8 |
new file mode 100644
|
|
|
b971b8 |
index 0000000000..ac2ffb4ce2
|
|
|
b971b8 |
--- /dev/null
|
|
|
b971b8 |
+++ b/tests/qemublocktestdata/bitmapblockcopy/snapshots-deep-out.json
|
|
|
b971b8 |
@@ -0,0 +1,180 @@
|
|
|
b971b8 |
+[
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-add",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "current",
|
|
|
b971b8 |
+ "persistent": true,
|
|
|
b971b8 |
+ "disabled": false,
|
|
|
b971b8 |
+ "granularity": 65536
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "target": "current",
|
|
|
b971b8 |
+ "bitmaps": [
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-1-format",
|
|
|
b971b8 |
+ "name": "current"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ ]
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-add",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "c",
|
|
|
b971b8 |
+ "persistent": true,
|
|
|
b971b8 |
+ "disabled": false,
|
|
|
b971b8 |
+ "granularity": 65536
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "target": "c",
|
|
|
b971b8 |
+ "bitmaps": [
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-1-format",
|
|
|
b971b8 |
+ "name": "c"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-2-format",
|
|
|
b971b8 |
+ "name": "c"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-3-format",
|
|
|
b971b8 |
+ "name": "c"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ ]
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-add",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "b",
|
|
|
b971b8 |
+ "persistent": true,
|
|
|
b971b8 |
+ "disabled": false,
|
|
|
b971b8 |
+ "granularity": 65536
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "target": "b",
|
|
|
b971b8 |
+ "bitmaps": [
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-1-format",
|
|
|
b971b8 |
+ "name": "b"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-2-format",
|
|
|
b971b8 |
+ "name": "b"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-3-format",
|
|
|
b971b8 |
+ "name": "b"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ ]
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-add",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "a",
|
|
|
b971b8 |
+ "persistent": true,
|
|
|
b971b8 |
+ "disabled": false,
|
|
|
b971b8 |
+ "granularity": 65536
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "target": "a",
|
|
|
b971b8 |
+ "bitmaps": [
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-1-format",
|
|
|
b971b8 |
+ "name": "a"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-2-format",
|
|
|
b971b8 |
+ "name": "a"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-3-format",
|
|
|
b971b8 |
+ "name": "a"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-4-format",
|
|
|
b971b8 |
+ "name": "a"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-5-format",
|
|
|
b971b8 |
+ "name": "a"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ ]
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-add",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "d",
|
|
|
b971b8 |
+ "persistent": true,
|
|
|
b971b8 |
+ "disabled": false,
|
|
|
b971b8 |
+ "granularity": 65536
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "target": "d",
|
|
|
b971b8 |
+ "bitmaps": [
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-1-format",
|
|
|
b971b8 |
+ "name": "d"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-2-format",
|
|
|
b971b8 |
+ "name": "d"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ ]
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-remove",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+]
|
|
|
b971b8 |
diff --git a/tests/qemublocktestdata/bitmapblockcopy/snapshots-shallow-out.json b/tests/qemublocktestdata/bitmapblockcopy/snapshots-shallow-out.json
|
|
|
b971b8 |
new file mode 100644
|
|
|
b971b8 |
index 0000000000..3a9942569a
|
|
|
b971b8 |
--- /dev/null
|
|
|
b971b8 |
+++ b/tests/qemublocktestdata/bitmapblockcopy/snapshots-shallow-out.json
|
|
|
b971b8 |
@@ -0,0 +1,144 @@
|
|
|
b971b8 |
+[
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-add",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "current",
|
|
|
b971b8 |
+ "persistent": true,
|
|
|
b971b8 |
+ "disabled": false,
|
|
|
b971b8 |
+ "granularity": 65536
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "target": "current",
|
|
|
b971b8 |
+ "bitmaps": [
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-1-format",
|
|
|
b971b8 |
+ "name": "current"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ ]
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-add",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "c",
|
|
|
b971b8 |
+ "persistent": true,
|
|
|
b971b8 |
+ "disabled": false,
|
|
|
b971b8 |
+ "granularity": 65536
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "target": "c",
|
|
|
b971b8 |
+ "bitmaps": [
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-1-format",
|
|
|
b971b8 |
+ "name": "c"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ ]
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-add",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "b",
|
|
|
b971b8 |
+ "persistent": true,
|
|
|
b971b8 |
+ "disabled": false,
|
|
|
b971b8 |
+ "granularity": 65536
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "target": "b",
|
|
|
b971b8 |
+ "bitmaps": [
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-1-format",
|
|
|
b971b8 |
+ "name": "b"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ ]
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-add",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "a",
|
|
|
b971b8 |
+ "persistent": true,
|
|
|
b971b8 |
+ "disabled": false,
|
|
|
b971b8 |
+ "granularity": 65536
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "target": "a",
|
|
|
b971b8 |
+ "bitmaps": [
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-1-format",
|
|
|
b971b8 |
+ "name": "a"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ ]
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-add",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "d",
|
|
|
b971b8 |
+ "persistent": true,
|
|
|
b971b8 |
+ "disabled": false,
|
|
|
b971b8 |
+ "granularity": 65536
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "target": "d",
|
|
|
b971b8 |
+ "bitmaps": [
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "libvirt-1-format",
|
|
|
b971b8 |
+ "name": "d"
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ ]
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ },
|
|
|
b971b8 |
+ {
|
|
|
b971b8 |
+ "type": "block-dirty-bitmap-remove",
|
|
|
b971b8 |
+ "data": {
|
|
|
b971b8 |
+ "node": "mirror-format-node",
|
|
|
b971b8 |
+ "name": "libvirt-tmp-activewrite"
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+ }
|
|
|
b971b8 |
+]
|
|
|
b971b8 |
--
|
|
|
b971b8 |
2.27.0
|
|
|
b971b8 |
|