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