|
|
a41c76 |
From 3afb35cc6b6dabd52fe508766d5a914d74135f69 Mon Sep 17 00:00:00 2001
|
|
|
a41c76 |
Message-Id: <3afb35cc6b6dabd52fe508766d5a914d74135f69@dist-git>
|
|
|
a41c76 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
a41c76 |
Date: Tue, 23 Jun 2020 12:23:52 +0200
|
|
|
a41c76 |
Subject: [PATCH] qemublocktest: Add new 'synthetic' bitmap detection and
|
|
|
a41c76 |
validation test case
|
|
|
a41c76 |
MIME-Version: 1.0
|
|
|
a41c76 |
Content-Type: text/plain; charset=UTF-8
|
|
|
a41c76 |
Content-Transfer-Encoding: 8bit
|
|
|
a41c76 |
|
|
|
a41c76 |
Based on the 'snapshots' example with manual tweaks to introduce
|
|
|
a41c76 |
inactive, transient, inconsistent and duplicate bitmaps in various parts
|
|
|
a41c76 |
of the chain to exercise detection and new validation code.
|
|
|
a41c76 |
|
|
|
a41c76 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
a41c76 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
a41c76 |
(cherry picked from commit b3845f0e3d0ec58b25274cb6b70906f44333069f)
|
|
|
a41c76 |
https://bugzilla.redhat.com/show_bug.cgi?id=1804593
|
|
|
a41c76 |
Message-Id: <6e6222a085da03ad17af728db3bdb9027c0d8b0e.1592906423.git.pkrempa@redhat.com>
|
|
|
a41c76 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
a41c76 |
---
|
|
|
a41c76 |
tests/qemublocktest.c | 11 +
|
|
|
a41c76 |
tests/qemublocktestdata/bitmap/synthetic.json | 506 ++++++++++++++++++
|
|
|
a41c76 |
tests/qemublocktestdata/bitmap/synthetic.out | 15 +
|
|
|
a41c76 |
3 files changed, 532 insertions(+)
|
|
|
a41c76 |
create mode 100644 tests/qemublocktestdata/bitmap/synthetic.json
|
|
|
a41c76 |
create mode 100644 tests/qemublocktestdata/bitmap/synthetic.out
|
|
|
a41c76 |
|
|
|
a41c76 |
diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c
|
|
|
a41c76 |
index af81f1b77a..2f675d7e03 100644
|
|
|
a41c76 |
--- a/tests/qemublocktest.c
|
|
|
a41c76 |
+++ b/tests/qemublocktest.c
|
|
|
a41c76 |
@@ -1302,6 +1302,7 @@ mymain(void)
|
|
|
a41c76 |
|
|
|
a41c76 |
TEST_BITMAP_DETECT("basic");
|
|
|
a41c76 |
TEST_BITMAP_DETECT("snapshots");
|
|
|
a41c76 |
+ TEST_BITMAP_DETECT("synthetic");
|
|
|
a41c76 |
|
|
|
a41c76 |
#define TEST_BACKUP_BITMAP_CALCULATE(testname, source, incrbackup, named) \
|
|
|
a41c76 |
do { \
|
|
|
a41c76 |
@@ -1357,6 +1358,16 @@ mymain(void)
|
|
|
a41c76 |
TEST_BITMAP_VALIDATE("snapshots", "d", true);
|
|
|
a41c76 |
TEST_BITMAP_VALIDATE("snapshots", "current", true);
|
|
|
a41c76 |
|
|
|
a41c76 |
+ TEST_BITMAP_VALIDATE("synthetic", "a", false);
|
|
|
a41c76 |
+ TEST_BITMAP_VALIDATE("synthetic", "b", false);
|
|
|
a41c76 |
+ TEST_BITMAP_VALIDATE("synthetic", "c", false);
|
|
|
a41c76 |
+ TEST_BITMAP_VALIDATE("synthetic", "d", false);
|
|
|
a41c76 |
+ TEST_BITMAP_VALIDATE("synthetic", "current", false);
|
|
|
a41c76 |
+ TEST_BITMAP_VALIDATE("synthetic", "top-ok", true);
|
|
|
a41c76 |
+ TEST_BITMAP_VALIDATE("synthetic", "top-inactive", false);
|
|
|
a41c76 |
+ TEST_BITMAP_VALIDATE("synthetic", "top-transient", false);
|
|
|
a41c76 |
+ TEST_BITMAP_VALIDATE("synthetic", "top-inactive-transient", false);
|
|
|
a41c76 |
+
|
|
|
a41c76 |
#define TEST_BITMAP_BLOCKCOPY(testname, shllw, ndf) \
|
|
|
a41c76 |
do { \
|
|
|
a41c76 |
blockbitmapblockcopydata.name = testname; \
|
|
|
a41c76 |
diff --git a/tests/qemublocktestdata/bitmap/synthetic.json b/tests/qemublocktestdata/bitmap/synthetic.json
|
|
|
a41c76 |
new file mode 100644
|
|
|
a41c76 |
index 0000000000..3712c8e5fc
|
|
|
a41c76 |
--- /dev/null
|
|
|
a41c76 |
+++ b/tests/qemublocktestdata/bitmap/synthetic.json
|
|
|
a41c76 |
@@ -0,0 +1,506 @@
|
|
|
a41c76 |
+[
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "iops_rd": 0,
|
|
|
a41c76 |
+ "detect_zeroes": "off",
|
|
|
a41c76 |
+ "image": {
|
|
|
a41c76 |
+ "backing-filename-format": "qcow2",
|
|
|
a41c76 |
+ "virtual-size": 10485760,
|
|
|
a41c76 |
+ "filename": "/tmp/bitmaps.1590749073",
|
|
|
a41c76 |
+ "cluster-size": 65536,
|
|
|
a41c76 |
+ "format": "qcow2",
|
|
|
a41c76 |
+ "actual-size": 208896,
|
|
|
a41c76 |
+ "format-specific": {
|
|
|
a41c76 |
+ "type": "qcow2",
|
|
|
a41c76 |
+ "data": {
|
|
|
a41c76 |
+ "compat": "1.1",
|
|
|
a41c76 |
+ "compression-type": "zlib",
|
|
|
a41c76 |
+ "lazy-refcounts": false,
|
|
|
a41c76 |
+ "bitmaps": [
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "flags": [
|
|
|
a41c76 |
+ "in-use",
|
|
|
a41c76 |
+ "auto"
|
|
|
a41c76 |
+ ],
|
|
|
a41c76 |
+ "name": "current",
|
|
|
a41c76 |
+ "granularity": 65536
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ ],
|
|
|
a41c76 |
+ "refcount-bits": 16,
|
|
|
a41c76 |
+ "corrupt": false
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "full-backing-filename": "/tmp/bitmaps.1590749012",
|
|
|
a41c76 |
+ "backing-filename": "/tmp/bitmaps.1590749012",
|
|
|
a41c76 |
+ "dirty-flag": false
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "iops_wr": 0,
|
|
|
a41c76 |
+ "ro": false,
|
|
|
a41c76 |
+ "node-name": "libvirt-1-format",
|
|
|
a41c76 |
+ "backing_file_depth": 0,
|
|
|
a41c76 |
+ "drv": "qcow2",
|
|
|
a41c76 |
+ "iops": 0,
|
|
|
a41c76 |
+ "bps_wr": 0,
|
|
|
a41c76 |
+ "write_threshold": 0,
|
|
|
a41c76 |
+ "backing_file": "/tmp/bitmaps.1590749012",
|
|
|
a41c76 |
+ "dirty-bitmaps": [
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "name": "current",
|
|
|
a41c76 |
+ "recording": true,
|
|
|
a41c76 |
+ "persistent": true,
|
|
|
a41c76 |
+ "busy": false,
|
|
|
a41c76 |
+ "status": "active",
|
|
|
a41c76 |
+ "inconsistent": true,
|
|
|
a41c76 |
+ "granularity": 65536,
|
|
|
a41c76 |
+ "count": 0
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "name": "top-ok",
|
|
|
a41c76 |
+ "recording": true,
|
|
|
a41c76 |
+ "persistent": true,
|
|
|
a41c76 |
+ "busy": false,
|
|
|
a41c76 |
+ "status": "active",
|
|
|
a41c76 |
+ "granularity": 65536,
|
|
|
a41c76 |
+ "count": 0
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "name": "top-inactive",
|
|
|
a41c76 |
+ "recording": false,
|
|
|
a41c76 |
+ "persistent": true,
|
|
|
a41c76 |
+ "busy": false,
|
|
|
a41c76 |
+ "status": "active",
|
|
|
a41c76 |
+ "granularity": 65536,
|
|
|
a41c76 |
+ "count": 0
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "name": "top-transient",
|
|
|
a41c76 |
+ "recording": true,
|
|
|
a41c76 |
+ "persistent": false,
|
|
|
a41c76 |
+ "busy": false,
|
|
|
a41c76 |
+ "status": "active",
|
|
|
a41c76 |
+ "granularity": 65536,
|
|
|
a41c76 |
+ "count": 0
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "name": "top-transient-inactive",
|
|
|
a41c76 |
+ "recording": false,
|
|
|
a41c76 |
+ "persistent": false,
|
|
|
a41c76 |
+ "busy": false,
|
|
|
a41c76 |
+ "status": "active",
|
|
|
a41c76 |
+ "granularity": 65536,
|
|
|
a41c76 |
+ "count": 0
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ ],
|
|
|
a41c76 |
+ "encrypted": false,
|
|
|
a41c76 |
+ "bps": 0,
|
|
|
a41c76 |
+ "bps_rd": 0,
|
|
|
a41c76 |
+ "cache": {
|
|
|
a41c76 |
+ "no-flush": false,
|
|
|
a41c76 |
+ "direct": false,
|
|
|
a41c76 |
+ "writeback": true
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "file": "/tmp/bitmaps.1590749073",
|
|
|
a41c76 |
+ "encryption_key_missing": false
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "iops_rd": 0,
|
|
|
a41c76 |
+ "detect_zeroes": "off",
|
|
|
a41c76 |
+ "image": {
|
|
|
a41c76 |
+ "virtual-size": 328192,
|
|
|
a41c76 |
+ "filename": "/tmp/bitmaps.1590749073",
|
|
|
a41c76 |
+ "format": "file",
|
|
|
a41c76 |
+ "actual-size": 208896,
|
|
|
a41c76 |
+ "dirty-flag": false
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "iops_wr": 0,
|
|
|
a41c76 |
+ "ro": false,
|
|
|
a41c76 |
+ "node-name": "libvirt-1-storage",
|
|
|
a41c76 |
+ "backing_file_depth": 0,
|
|
|
a41c76 |
+ "drv": "file",
|
|
|
a41c76 |
+ "iops": 0,
|
|
|
a41c76 |
+ "bps_wr": 0,
|
|
|
a41c76 |
+ "write_threshold": 0,
|
|
|
a41c76 |
+ "encrypted": false,
|
|
|
a41c76 |
+ "bps": 0,
|
|
|
a41c76 |
+ "bps_rd": 0,
|
|
|
a41c76 |
+ "cache": {
|
|
|
a41c76 |
+ "no-flush": false,
|
|
|
a41c76 |
+ "direct": false,
|
|
|
a41c76 |
+ "writeback": true
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "file": "/tmp/bitmaps.1590749073",
|
|
|
a41c76 |
+ "encryption_key_missing": false
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "iops_rd": 0,
|
|
|
a41c76 |
+ "detect_zeroes": "off",
|
|
|
a41c76 |
+ "image": {
|
|
|
a41c76 |
+ "backing-filename-format": "qcow2",
|
|
|
a41c76 |
+ "virtual-size": 10485760,
|
|
|
a41c76 |
+ "filename": "/tmp/bitmaps.1590749012",
|
|
|
a41c76 |
+ "cluster-size": 65536,
|
|
|
a41c76 |
+ "format": "qcow2",
|
|
|
a41c76 |
+ "actual-size": 208896,
|
|
|
a41c76 |
+ "format-specific": {
|
|
|
a41c76 |
+ "type": "qcow2",
|
|
|
a41c76 |
+ "data": {
|
|
|
a41c76 |
+ "compat": "1.1",
|
|
|
a41c76 |
+ "compression-type": "zlib",
|
|
|
a41c76 |
+ "lazy-refcounts": false,
|
|
|
a41c76 |
+ "bitmaps": [
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "flags": [
|
|
|
a41c76 |
+ "auto"
|
|
|
a41c76 |
+ ],
|
|
|
a41c76 |
+ "name": "d",
|
|
|
a41c76 |
+ "granularity": 65536
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ ],
|
|
|
a41c76 |
+ "refcount-bits": 16,
|
|
|
a41c76 |
+ "corrupt": false
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "full-backing-filename": "/tmp/bitmaps.1590748995",
|
|
|
a41c76 |
+ "backing-filename": "/tmp/bitmaps.1590748995",
|
|
|
a41c76 |
+ "dirty-flag": false
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "iops_wr": 0,
|
|
|
a41c76 |
+ "ro": true,
|
|
|
a41c76 |
+ "node-name": "libvirt-2-format",
|
|
|
a41c76 |
+ "backing_file_depth": 0,
|
|
|
a41c76 |
+ "drv": "qcow2",
|
|
|
a41c76 |
+ "iops": 0,
|
|
|
a41c76 |
+ "bps_wr": 0,
|
|
|
a41c76 |
+ "write_threshold": 0,
|
|
|
a41c76 |
+ "backing_file": "/tmp/bitmaps.1590748995",
|
|
|
a41c76 |
+ "dirty-bitmaps": [
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "name": "d",
|
|
|
a41c76 |
+ "recording": true,
|
|
|
a41c76 |
+ "persistent": true,
|
|
|
a41c76 |
+ "busy": false,
|
|
|
a41c76 |
+ "status": "active",
|
|
|
a41c76 |
+ "granularity": 65536,
|
|
|
a41c76 |
+ "count": 0
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ ],
|
|
|
a41c76 |
+ "encrypted": false,
|
|
|
a41c76 |
+ "bps": 0,
|
|
|
a41c76 |
+ "bps_rd": 0,
|
|
|
a41c76 |
+ "cache": {
|
|
|
a41c76 |
+ "no-flush": false,
|
|
|
a41c76 |
+ "direct": false,
|
|
|
a41c76 |
+ "writeback": true
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "file": "/tmp/bitmaps.1590749012",
|
|
|
a41c76 |
+ "encryption_key_missing": false
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "iops_rd": 0,
|
|
|
a41c76 |
+ "detect_zeroes": "off",
|
|
|
a41c76 |
+ "image": {
|
|
|
a41c76 |
+ "virtual-size": 328192,
|
|
|
a41c76 |
+ "filename": "/tmp/bitmaps.1590749012",
|
|
|
a41c76 |
+ "format": "file",
|
|
|
a41c76 |
+ "actual-size": 208896,
|
|
|
a41c76 |
+ "dirty-flag": false
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "iops_wr": 0,
|
|
|
a41c76 |
+ "ro": false,
|
|
|
a41c76 |
+ "node-name": "libvirt-2-storage",
|
|
|
a41c76 |
+ "backing_file_depth": 0,
|
|
|
a41c76 |
+ "drv": "file",
|
|
|
a41c76 |
+ "iops": 0,
|
|
|
a41c76 |
+ "bps_wr": 0,
|
|
|
a41c76 |
+ "write_threshold": 0,
|
|
|
a41c76 |
+ "encrypted": false,
|
|
|
a41c76 |
+ "bps": 0,
|
|
|
a41c76 |
+ "bps_rd": 0,
|
|
|
a41c76 |
+ "cache": {
|
|
|
a41c76 |
+ "no-flush": false,
|
|
|
a41c76 |
+ "direct": false,
|
|
|
a41c76 |
+ "writeback": true
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "file": "/tmp/bitmaps.1590749012",
|
|
|
a41c76 |
+ "encryption_key_missing": false
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "iops_rd": 0,
|
|
|
a41c76 |
+ "detect_zeroes": "off",
|
|
|
a41c76 |
+ "image": {
|
|
|
a41c76 |
+ "backing-filename-format": "qcow2",
|
|
|
a41c76 |
+ "virtual-size": 10485760,
|
|
|
a41c76 |
+ "filename": "/tmp/bitmaps.1590748995",
|
|
|
a41c76 |
+ "cluster-size": 65536,
|
|
|
a41c76 |
+ "format": "qcow2",
|
|
|
a41c76 |
+ "actual-size": 212992,
|
|
|
a41c76 |
+ "format-specific": {
|
|
|
a41c76 |
+ "type": "qcow2",
|
|
|
a41c76 |
+ "data": {
|
|
|
a41c76 |
+ "compat": "1.1",
|
|
|
a41c76 |
+ "compression-type": "zlib",
|
|
|
a41c76 |
+ "lazy-refcounts": false,
|
|
|
a41c76 |
+ "bitmaps": [
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "flags": [
|
|
|
a41c76 |
+ "auto"
|
|
|
a41c76 |
+ ],
|
|
|
a41c76 |
+ "name": "c",
|
|
|
a41c76 |
+ "granularity": 65536
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "flags": [
|
|
|
a41c76 |
+ "auto"
|
|
|
a41c76 |
+ ],
|
|
|
a41c76 |
+ "name": "b",
|
|
|
a41c76 |
+ "granularity": 65536
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ ],
|
|
|
a41c76 |
+ "refcount-bits": 16,
|
|
|
a41c76 |
+ "corrupt": false
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "full-backing-filename": "/tmp/bitmaps.1590748992",
|
|
|
a41c76 |
+ "backing-filename": "/tmp/bitmaps.1590748992",
|
|
|
a41c76 |
+ "dirty-flag": false
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "iops_wr": 0,
|
|
|
a41c76 |
+ "ro": true,
|
|
|
a41c76 |
+ "node-name": "libvirt-3-format",
|
|
|
a41c76 |
+ "backing_file_depth": 0,
|
|
|
a41c76 |
+ "drv": "qcow2",
|
|
|
a41c76 |
+ "iops": 0,
|
|
|
a41c76 |
+ "bps_wr": 0,
|
|
|
a41c76 |
+ "write_threshold": 0,
|
|
|
a41c76 |
+ "backing_file": "/tmp/bitmaps.1590748992",
|
|
|
a41c76 |
+ "dirty-bitmaps": [
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "name": "b",
|
|
|
a41c76 |
+ "recording": true,
|
|
|
a41c76 |
+ "persistent": false,
|
|
|
a41c76 |
+ "busy": false,
|
|
|
a41c76 |
+ "status": "active",
|
|
|
a41c76 |
+ "granularity": 65536,
|
|
|
a41c76 |
+ "count": 0
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "name": "c",
|
|
|
a41c76 |
+ "recording": false,
|
|
|
a41c76 |
+ "persistent": true,
|
|
|
a41c76 |
+ "busy": false,
|
|
|
a41c76 |
+ "status": "active",
|
|
|
a41c76 |
+ "granularity": 65536,
|
|
|
a41c76 |
+ "count": 0
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "name": "d",
|
|
|
a41c76 |
+ "recording": true,
|
|
|
a41c76 |
+ "persistent": true,
|
|
|
a41c76 |
+ "busy": false,
|
|
|
a41c76 |
+ "status": "active",
|
|
|
a41c76 |
+ "granularity": 65536,
|
|
|
a41c76 |
+ "count": 0
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ ],
|
|
|
a41c76 |
+ "encrypted": false,
|
|
|
a41c76 |
+ "bps": 0,
|
|
|
a41c76 |
+ "bps_rd": 0,
|
|
|
a41c76 |
+ "cache": {
|
|
|
a41c76 |
+ "no-flush": false,
|
|
|
a41c76 |
+ "direct": false,
|
|
|
a41c76 |
+ "writeback": true
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "file": "/tmp/bitmaps.1590748995",
|
|
|
a41c76 |
+ "encryption_key_missing": false
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "iops_rd": 0,
|
|
|
a41c76 |
+ "detect_zeroes": "off",
|
|
|
a41c76 |
+ "image": {
|
|
|
a41c76 |
+ "virtual-size": 393728,
|
|
|
a41c76 |
+ "filename": "/tmp/bitmaps.1590748995",
|
|
|
a41c76 |
+ "format": "file",
|
|
|
a41c76 |
+ "actual-size": 212992,
|
|
|
a41c76 |
+ "dirty-flag": false
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "iops_wr": 0,
|
|
|
a41c76 |
+ "ro": false,
|
|
|
a41c76 |
+ "node-name": "libvirt-3-storage",
|
|
|
a41c76 |
+ "backing_file_depth": 0,
|
|
|
a41c76 |
+ "drv": "file",
|
|
|
a41c76 |
+ "iops": 0,
|
|
|
a41c76 |
+ "bps_wr": 0,
|
|
|
a41c76 |
+ "write_threshold": 0,
|
|
|
a41c76 |
+ "encrypted": false,
|
|
|
a41c76 |
+ "bps": 0,
|
|
|
a41c76 |
+ "bps_rd": 0,
|
|
|
a41c76 |
+ "cache": {
|
|
|
a41c76 |
+ "no-flush": false,
|
|
|
a41c76 |
+ "direct": false,
|
|
|
a41c76 |
+ "writeback": true
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "file": "/tmp/bitmaps.1590748995",
|
|
|
a41c76 |
+ "encryption_key_missing": false
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "iops_rd": 0,
|
|
|
a41c76 |
+ "detect_zeroes": "off",
|
|
|
a41c76 |
+ "image": {
|
|
|
a41c76 |
+ "backing-filename-format": "qcow2",
|
|
|
a41c76 |
+ "virtual-size": 10485760,
|
|
|
a41c76 |
+ "filename": "/tmp/bitmaps.1590748992",
|
|
|
a41c76 |
+ "cluster-size": 65536,
|
|
|
a41c76 |
+ "format": "qcow2",
|
|
|
a41c76 |
+ "actual-size": 200704,
|
|
|
a41c76 |
+ "format-specific": {
|
|
|
a41c76 |
+ "type": "qcow2",
|
|
|
a41c76 |
+ "data": {
|
|
|
a41c76 |
+ "compat": "1.1",
|
|
|
a41c76 |
+ "compression-type": "zlib",
|
|
|
a41c76 |
+ "lazy-refcounts": false,
|
|
|
a41c76 |
+ "refcount-bits": 16,
|
|
|
a41c76 |
+ "corrupt": false
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "full-backing-filename": "/tmp/bitmaps.qcow2",
|
|
|
a41c76 |
+ "backing-filename": "/tmp/bitmaps.qcow2",
|
|
|
a41c76 |
+ "dirty-flag": false
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "iops_wr": 0,
|
|
|
a41c76 |
+ "ro": true,
|
|
|
a41c76 |
+ "node-name": "libvirt-4-format",
|
|
|
a41c76 |
+ "backing_file_depth": 0,
|
|
|
a41c76 |
+ "drv": "qcow2",
|
|
|
a41c76 |
+ "iops": 0,
|
|
|
a41c76 |
+ "bps_wr": 0,
|
|
|
a41c76 |
+ "write_threshold": 0,
|
|
|
a41c76 |
+ "backing_file": "/tmp/bitmaps.qcow2",
|
|
|
a41c76 |
+ "encrypted": false,
|
|
|
a41c76 |
+ "bps": 0,
|
|
|
a41c76 |
+ "bps_rd": 0,
|
|
|
a41c76 |
+ "cache": {
|
|
|
a41c76 |
+ "no-flush": false,
|
|
|
a41c76 |
+ "direct": false,
|
|
|
a41c76 |
+ "writeback": true
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "file": "/tmp/bitmaps.1590748992",
|
|
|
a41c76 |
+ "encryption_key_missing": false
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "iops_rd": 0,
|
|
|
a41c76 |
+ "detect_zeroes": "off",
|
|
|
a41c76 |
+ "image": {
|
|
|
a41c76 |
+ "virtual-size": 197120,
|
|
|
a41c76 |
+ "filename": "/tmp/bitmaps.1590748992",
|
|
|
a41c76 |
+ "format": "file",
|
|
|
a41c76 |
+ "actual-size": 200704,
|
|
|
a41c76 |
+ "dirty-flag": false
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "iops_wr": 0,
|
|
|
a41c76 |
+ "ro": false,
|
|
|
a41c76 |
+ "node-name": "libvirt-4-storage",
|
|
|
a41c76 |
+ "backing_file_depth": 0,
|
|
|
a41c76 |
+ "drv": "file",
|
|
|
a41c76 |
+ "iops": 0,
|
|
|
a41c76 |
+ "bps_wr": 0,
|
|
|
a41c76 |
+ "write_threshold": 0,
|
|
|
a41c76 |
+ "encrypted": false,
|
|
|
a41c76 |
+ "bps": 0,
|
|
|
a41c76 |
+ "bps_rd": 0,
|
|
|
a41c76 |
+ "cache": {
|
|
|
a41c76 |
+ "no-flush": false,
|
|
|
a41c76 |
+ "direct": false,
|
|
|
a41c76 |
+ "writeback": true
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "file": "/tmp/bitmaps.1590748992",
|
|
|
a41c76 |
+ "encryption_key_missing": false
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "iops_rd": 0,
|
|
|
a41c76 |
+ "detect_zeroes": "off",
|
|
|
a41c76 |
+ "image": {
|
|
|
a41c76 |
+ "virtual-size": 10485760,
|
|
|
a41c76 |
+ "filename": "/tmp/bitmaps.qcow2",
|
|
|
a41c76 |
+ "cluster-size": 65536,
|
|
|
a41c76 |
+ "format": "qcow2",
|
|
|
a41c76 |
+ "actual-size": 208896,
|
|
|
a41c76 |
+ "format-specific": {
|
|
|
a41c76 |
+ "type": "qcow2",
|
|
|
a41c76 |
+ "data": {
|
|
|
a41c76 |
+ "compat": "1.1",
|
|
|
a41c76 |
+ "compression-type": "zlib",
|
|
|
a41c76 |
+ "lazy-refcounts": false,
|
|
|
a41c76 |
+ "bitmaps": [
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "flags": [
|
|
|
a41c76 |
+ "auto"
|
|
|
a41c76 |
+ ],
|
|
|
a41c76 |
+ "name": "a",
|
|
|
a41c76 |
+ "granularity": 65536
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ ],
|
|
|
a41c76 |
+ "refcount-bits": 16,
|
|
|
a41c76 |
+ "corrupt": false
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "dirty-flag": false
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "iops_wr": 0,
|
|
|
a41c76 |
+ "ro": true,
|
|
|
a41c76 |
+ "node-name": "libvirt-5-format",
|
|
|
a41c76 |
+ "backing_file_depth": 0,
|
|
|
a41c76 |
+ "drv": "qcow2",
|
|
|
a41c76 |
+ "iops": 0,
|
|
|
a41c76 |
+ "bps_wr": 0,
|
|
|
a41c76 |
+ "write_threshold": 0,
|
|
|
a41c76 |
+ "dirty-bitmaps": [
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "name": "a",
|
|
|
a41c76 |
+ "recording": true,
|
|
|
a41c76 |
+ "persistent": true,
|
|
|
a41c76 |
+ "busy": false,
|
|
|
a41c76 |
+ "status": "active",
|
|
|
a41c76 |
+ "granularity": 65536,
|
|
|
a41c76 |
+ "count": 0
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ ],
|
|
|
a41c76 |
+ "encrypted": false,
|
|
|
a41c76 |
+ "bps": 0,
|
|
|
a41c76 |
+ "bps_rd": 0,
|
|
|
a41c76 |
+ "cache": {
|
|
|
a41c76 |
+ "no-flush": false,
|
|
|
a41c76 |
+ "direct": false,
|
|
|
a41c76 |
+ "writeback": true
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "file": "/tmp/bitmaps.qcow2",
|
|
|
a41c76 |
+ "encryption_key_missing": false
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "iops_rd": 0,
|
|
|
a41c76 |
+ "detect_zeroes": "off",
|
|
|
a41c76 |
+ "image": {
|
|
|
a41c76 |
+ "virtual-size": 328192,
|
|
|
a41c76 |
+ "filename": "/tmp/bitmaps.qcow2",
|
|
|
a41c76 |
+ "format": "file",
|
|
|
a41c76 |
+ "actual-size": 208896,
|
|
|
a41c76 |
+ "dirty-flag": false
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "iops_wr": 0,
|
|
|
a41c76 |
+ "ro": false,
|
|
|
a41c76 |
+ "node-name": "libvirt-5-storage",
|
|
|
a41c76 |
+ "backing_file_depth": 0,
|
|
|
a41c76 |
+ "drv": "file",
|
|
|
a41c76 |
+ "iops": 0,
|
|
|
a41c76 |
+ "bps_wr": 0,
|
|
|
a41c76 |
+ "write_threshold": 0,
|
|
|
a41c76 |
+ "encrypted": false,
|
|
|
a41c76 |
+ "bps": 0,
|
|
|
a41c76 |
+ "bps_rd": 0,
|
|
|
a41c76 |
+ "cache": {
|
|
|
a41c76 |
+ "no-flush": false,
|
|
|
a41c76 |
+ "direct": false,
|
|
|
a41c76 |
+ "writeback": true
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ "file": "/tmp/bitmaps.qcow2",
|
|
|
a41c76 |
+ "encryption_key_missing": false
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+]
|
|
|
a41c76 |
diff --git a/tests/qemublocktestdata/bitmap/synthetic.out b/tests/qemublocktestdata/bitmap/synthetic.out
|
|
|
a41c76 |
new file mode 100644
|
|
|
a41c76 |
index 0000000000..cde7228e01
|
|
|
a41c76 |
--- /dev/null
|
|
|
a41c76 |
+++ b/tests/qemublocktestdata/bitmap/synthetic.out
|
|
|
a41c76 |
@@ -0,0 +1,15 @@
|
|
|
a41c76 |
+libvirt-1-format:
|
|
|
a41c76 |
+ current: record:1 busy:0 persist:1 inconsist:1 gran:65536 dirty:0
|
|
|
a41c76 |
+ top-ok: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
|
|
|
a41c76 |
+ top-inactive: record:0 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
|
|
|
a41c76 |
+ top-transient: record:1 busy:0 persist:0 inconsist:0 gran:65536 dirty:0
|
|
|
a41c76 |
+ top-transient-inactive: record:0 busy:0 persist:0 inconsist:0 gran:65536 dirty:0
|
|
|
a41c76 |
+libvirt-2-format:
|
|
|
a41c76 |
+ d: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
|
|
|
a41c76 |
+libvirt-3-format:
|
|
|
a41c76 |
+ b: record:1 busy:0 persist:0 inconsist:0 gran:65536 dirty:0
|
|
|
a41c76 |
+ c: record:0 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
|
|
|
a41c76 |
+ d: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
|
|
|
a41c76 |
+libvirt-4-format:
|
|
|
a41c76 |
+libvirt-5-format:
|
|
|
a41c76 |
+ a: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
|
|
|
a41c76 |
--
|
|
|
a41c76 |
2.27.0
|
|
|
a41c76 |
|