1== Commit tests == 2Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 compression_type=zlib size=2097152 lazy_refcounts=off refcount_bits=16 3 4Formatting 'TEST_DIR/PID-mid', fmt=qcow2 cluster_size=65536 compression_type=zlib size=1048576 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 5 6Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 compression_type=zlib size=2097152 backing_file=TEST_DIR/PID-mid backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 7 8wrote 2097152/2097152 bytes at offset 0 92 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 10 11=== Check visible data === 12read 1048576/1048576 bytes at offset 0 131 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 14 15read 1048576/1048576 bytes at offset 1048576 161 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 17 18=== Checking allocation status === 191048576/1048576 bytes allocated at offset 0 bytes 201048576/1048576 bytes allocated at offset 1 MiB 21 220/1048576 bytes allocated at offset 0 bytes 230/0 bytes allocated at offset 1 MiB 24 250/1048576 bytes allocated at offset 0 bytes 260/1048576 bytes allocated at offset 1 MiB 27 28=== Checking map === 29[{ "start": 0, "length": 2097152, "depth": 0, "zero": false, "data": true, "offset": 327680}] 30 31Offset Length Mapped to File 320 0x200000 0x50000 TEST_DIR/PID-base 33 34[{ "start": 0, "length": 1048576, "depth": 1, "zero": false, "data": true, "offset": 327680}] 35 36Offset Length Mapped to File 370 0x100000 0x50000 TEST_DIR/PID-base 38 39[{ "start": 0, "length": 1048576, "depth": 2, "zero": false, "data": true, "offset": 327680}, 40{ "start": 1048576, "length": 1048576, "depth": 0, "zero": true, "data": false}] 41 42Offset Length Mapped to File 430 0x100000 0x50000 TEST_DIR/PID-base 44 45=== Testing qemu-img commit (top -> mid) === 46Image committed. 47 48image: TEST_IMG 49file format: IMGFMT 50virtual size: 2 MiB (2097152 bytes) 51cluster_size: 65536 52backing file: TEST_DIR/PID-base 53backing file format: IMGFMT 54Format specific information: 55 compat: 1.1 56 compression type: zlib 57 lazy refcounts: false 58 refcount bits: 16 59 corrupt: false 60 61read 1048576/1048576 bytes at offset 0 621 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 63 64read 1048576/1048576 bytes at offset 1048576 651 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 66 67=== Testing HMP commit (top -> mid) === 68Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 compression_type=zlib size=2097152 lazy_refcounts=off refcount_bits=16 69 70Formatting 'TEST_DIR/PID-mid', fmt=qcow2 cluster_size=65536 compression_type=zlib size=1048576 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 71 72Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 compression_type=zlib size=2097152 backing_file=TEST_DIR/PID-mid backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 73 74wrote 2097152/2097152 bytes at offset 0 752 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 76 77{"execute": "human-monitor-command", "arguments": {"command-line": "commit drive0"}} 78{"return": ""} 79image: TEST_IMG 80file format: IMGFMT 81virtual size: 2 MiB (2097152 bytes) 82cluster_size: 65536 83backing file: TEST_DIR/PID-base 84backing file format: IMGFMT 85Format specific information: 86 compat: 1.1 87 compression type: zlib 88 lazy refcounts: false 89 refcount bits: 16 90 corrupt: false 91 92read 1048576/1048576 bytes at offset 0 931 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 94 95read 1048576/1048576 bytes at offset 1048576 961 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 97 98=== Testing QMP active commit (top -> mid) === 99Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 compression_type=zlib size=2097152 lazy_refcounts=off refcount_bits=16 100 101Formatting 'TEST_DIR/PID-mid', fmt=qcow2 cluster_size=65536 compression_type=zlib size=1048576 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 102 103Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 compression_type=zlib size=2097152 backing_file=TEST_DIR/PID-mid backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 104 105wrote 2097152/2097152 bytes at offset 0 1062 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 107 108{"execute": "block-commit", "arguments": {"auto-dismiss": false, "base-node": "mid", "device": "top", "job-id": "job0"}} 109{"return": {}} 110{"execute": "job-complete", "arguments": {"id": "job0"}} 111{"return": {}} 112{"data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "commit"}, "event": "BLOCK_JOB_READY", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} 113{"data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "commit"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} 114{"execute": "job-dismiss", "arguments": {"id": "job0"}} 115{"return": {}} 116image: TEST_IMG 117file format: IMGFMT 118virtual size: 2 MiB (2097152 bytes) 119cluster_size: 65536 120backing file: TEST_DIR/PID-base 121backing file format: IMGFMT 122Format specific information: 123 compat: 1.1 124 compression type: zlib 125 lazy refcounts: false 126 refcount bits: 16 127 corrupt: false 128 129read 1048576/1048576 bytes at offset 0 1301 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 131 132read 1048576/1048576 bytes at offset 1048576 1331 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 134 135== Resize tests == 136=== preallocation=off === 137Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 compression_type=zlib size=6442450944 lazy_refcounts=off refcount_bits=16 138 139Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 compression_type=zlib size=1073741824 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 140 141wrote 65536/65536 bytes at offset 5368709120 14264 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 143 144Image resized. 145 146read 65536/65536 bytes at offset 5368709120 14764 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 148 1491 GiB (0x40000000) bytes not allocated at offset 0 bytes (0x0) 1507 GiB (0x1c0000000) bytes allocated at offset 1 GiB (0x40000000) 151 152[{ "start": 0, "length": 1073741824, "depth": 1, "zero": true, "data": false}, 153{ "start": 1073741824, "length": 7516192768, "depth": 0, "zero": true, "data": false}] 154 155=== preallocation=metadata === 156Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 compression_type=zlib size=34359738368 lazy_refcounts=off refcount_bits=16 157 158Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 compression_type=zlib size=32212254720 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 159 160wrote 65536/65536 bytes at offset 33285996544 16164 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 162 163Image resized. 164 165read 65536/65536 bytes at offset 33285996544 16664 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 167 16830 GiB (0x780000000) bytes not allocated at offset 0 bytes (0x0) 1693 GiB (0xc0000000) bytes allocated at offset 30 GiB (0x780000000) 170 171[{ "start": 0, "length": 32212254720, "depth": 1, "zero": true, "data": false}, 172{ "start": 32212254720, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 327680}, 173{ "start": 32749125632, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 537264128}, 174{ "start": 33285996544, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 1074200576}, 175{ "start": 33822867456, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 1611137024}, 176{ "start": 34359738368, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 2148139008}, 177{ "start": 34896609280, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 2685075456}] 178 179=== preallocation=falloc === 180Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 compression_type=zlib size=10485760 lazy_refcounts=off refcount_bits=16 181 182Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 compression_type=zlib size=5242880 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 183 184wrote 65536/65536 bytes at offset 9437184 18564 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 186 187Image resized. 188 189read 65536/65536 bytes at offset 9437184 19064 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 191 1925 MiB (0x500000) bytes not allocated at offset 0 bytes (0x0) 19310 MiB (0xa00000) bytes allocated at offset 5 MiB (0x500000) 194 195[{ "start": 0, "length": 5242880, "depth": 1, "zero": true, "data": false}, 196{ "start": 5242880, "length": 10485760, "depth": 0, "zero": false, "data": true, "offset": 327680}] 197 198=== preallocation=full === 199Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 compression_type=zlib size=16777216 lazy_refcounts=off refcount_bits=16 200 201Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 compression_type=zlib size=8388608 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 202 203wrote 65536/65536 bytes at offset 11534336 20464 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 205 206Image resized. 207 208read 65536/65536 bytes at offset 11534336 20964 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 210 2118 MiB (0x800000) bytes not allocated at offset 0 bytes (0x0) 2124 MiB (0x400000) bytes allocated at offset 8 MiB (0x800000) 213 214[{ "start": 0, "length": 8388608, "depth": 1, "zero": true, "data": false}, 215{ "start": 8388608, "length": 4194304, "depth": 0, "zero": false, "data": true, "offset": 327680}] 216 217=== preallocation=off === 218Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 compression_type=zlib size=393216 lazy_refcounts=off refcount_bits=16 219 220Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 compression_type=zlib size=259072 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 221 222wrote 65536/65536 bytes at offset 259072 22364 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 224 225Image resized. 226 227read 65536/65536 bytes at offset 259072 22864 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 229 230192 KiB (0x30000) bytes not allocated at offset 0 bytes (0x0) 231320 KiB (0x50000) bytes allocated at offset 192 KiB (0x30000) 232 233[{ "start": 0, "length": 196608, "depth": 1, "zero": true, "data": false}, 234{ "start": 196608, "length": 65536, "depth": 0, "zero": false, "data": true, "offset": 327680}, 235{ "start": 262144, "length": 262144, "depth": 0, "zero": true, "data": false}] 236 237=== preallocation=off === 238Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 compression_type=zlib size=409600 lazy_refcounts=off refcount_bits=16 239 240Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 compression_type=zlib size=262144 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 241 242wrote 65536/65536 bytes at offset 344064 24364 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 244 245Image resized. 246 247read 65536/65536 bytes at offset 344064 24864 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 249 250256 KiB (0x40000) bytes not allocated at offset 0 bytes (0x0) 251256 KiB (0x40000) bytes allocated at offset 256 KiB (0x40000) 252 253[{ "start": 0, "length": 262144, "depth": 1, "zero": true, "data": false}, 254{ "start": 262144, "length": 262144, "depth": 0, "zero": true, "data": false}] 255 256=== preallocation=off === 257Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 compression_type=zlib size=524288 lazy_refcounts=off refcount_bits=16 258 259Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 compression_type=zlib size=262144 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 260 261wrote 65536/65536 bytes at offset 446464 26264 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 263 264Image resized. 265 266read 65536/65536 bytes at offset 446464 26764 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 268 269256 KiB (0x40000) bytes not allocated at offset 0 bytes (0x0) 270244 KiB (0x3d000) bytes allocated at offset 256 KiB (0x40000) 271 272[{ "start": 0, "length": 262144, "depth": 1, "zero": true, "data": false}, 273{ "start": 262144, "length": 249856, "depth": 0, "zero": true, "data": false}] 274 275