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