1QA output created by 060 2 3=== Testing L2 reference into L1 === 4 5Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 6ERROR cluster 3 refcount=1 reference=3 7 81 errors were found on the image. 9Data may be corrupted, or further writes to the image may corrupt it. 10incompatible_features [] 11qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps with active L1 table); further corruption events will be suppressed 12write failed: Input/output error 13incompatible_features [1] 14image: TEST_DIR/t.IMGFMT 15file format: IMGFMT 16virtual size: 64 MiB (67108864 bytes) 17cluster_size: 65536 18Format specific information: 19 compat: 1.1 20 lazy refcounts: false 21 refcount bits: 16 22 corrupt: true 23qemu-io: can't open device TEST_DIR/t.IMGFMT: IMGFMT: Image is corrupt; cannot be opened read/write 24no file open, try 'help open' 25read 512/512 bytes at offset 0 26512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 27 28=== Testing cluster data reference into refcount block === 29 30Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 31ERROR refcount block 0 refcount=2 32ERROR cluster 2 refcount=1 reference=2 33 342 errors were found on the image. 35Data may be corrupted, or further writes to the image may corrupt it. 36incompatible_features [] 37qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps with refcount block); further corruption events will be suppressed 38write failed: Input/output error 39incompatible_features [1] 40ERROR refcount block 0 refcount=2 41ERROR cluster 2 refcount=1 reference=2 42Rebuilding refcount structure 43Repairing cluster 1 refcount=1 reference=0 44Repairing cluster 2 refcount=2 reference=1 45The following inconsistencies were found and repaired: 46 47 0 leaked clusters 48 2 corruptions 49 50Double checking the fixed image now... 51No errors were found on the image. 52incompatible_features [] 53wrote 512/512 bytes at offset 0 54512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 55incompatible_features [] 56 57=== Testing cluster data reference into inactive L2 table === 58 59Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 60wrote 512/512 bytes at offset 0 61512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 62wrote 512/512 bytes at offset 0 63512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 64ERROR cluster 4 refcount=1 reference=2 65Leaked cluster 9 refcount=1 reference=0 66 671 errors were found on the image. 68Data may be corrupted, or further writes to the image may corrupt it. 69 701 leaked clusters were found on the image. 71This means waste of disk space, but no harm to data. 72incompatible_features [] 73qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps with inactive L2 table); further corruption events will be suppressed 74write failed: Input/output error 75incompatible_features [1] 76ERROR cluster 4 refcount=1 reference=2 77Leaked cluster 9 refcount=1 reference=0 78Repairing cluster 4 refcount=1 reference=2 79Repairing cluster 9 refcount=1 reference=0 80Repairing OFLAG_COPIED data cluster: l2_entry=8000000000040000 refcount=2 81The following inconsistencies were found and repaired: 82 83 1 leaked clusters 84 2 corruptions 85 86Double checking the fixed image now... 87No errors were found on the image. 88incompatible_features [] 89wrote 512/512 bytes at offset 0 90512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 91incompatible_features [] 92read 512/512 bytes at offset 0 93512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 94No errors were found on the image. 95read 512/512 bytes at offset 0 96512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 97 98=== Testing overlap while COW is in flight === 99 100Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=1073741824 101wrote 65536/65536 bytes at offset 0 10264 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 103Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 backing_file=TEST_DIR/t.IMGFMT.base 104wrote 65536/65536 bytes at offset 0 10564 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 106wrote 65536/65536 bytes at offset 536870912 10764 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 108qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps with active L2 table); further corruption events will be suppressed 109blkdebug: Suspended request '0' 110write failed: Input/output error 111blkdebug: Resuming request '0' 112aio_write failed: No medium found 113 114=== Testing unallocated image header === 115 116Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 117wrote 65536/65536 bytes at offset 0 11864 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 119qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps with qcow2_header); further corruption events will be suppressed 120write failed: Input/output error 121 122=== Testing unaligned L1 entry === 123 124Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 125wrote 65536/65536 bytes at offset 0 12664 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 127qcow2: Marking image as corrupt: L2 table offset 0x42a00 unaligned (L1 index: 0); further corruption events will be suppressed 128read failed: Input/output error 129Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 130wrote 65536/65536 bytes at offset 0 13164 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 132qcow2: Marking image as corrupt: L2 table offset 0x42a00 unaligned (L1 index: 0); further corruption events will be suppressed 133qemu-img: Failed to turn zero into data clusters: Input/output error 134 135=== Testing unaligned L2 entry === 136 137Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 138wrote 65536/65536 bytes at offset 0 13964 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 140qcow2: Marking image as corrupt: Cluster allocation offset 0x52a00 unaligned (L2 offset: 0x40000, L2 index: 0); further corruption events will be suppressed 141read failed: Input/output error 142 143=== Testing unaligned pre-allocated zero cluster === 144 145Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 146wrote 65536/65536 bytes at offset 0 14764 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 148qcow2: Marking image as corrupt: Cluster allocation offset 0x52a00 unaligned (L2 offset: 0x40000, L2 index: 0); further corruption events will be suppressed 149qemu-img: Failed to turn zero into data clusters: Input/output error 150 151=== Testing unaligned reftable entry === 152 153Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 154qcow2: Marking image as corrupt: Refblock offset 0x22a00 unaligned (reftable index: 0); further corruption events will be suppressed 155write failed: Input/output error 156 157=== Testing non-fatal corruption on freeing === 158 159Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 160wrote 65536/65536 bytes at offset 0 16164 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 162qcow2: Image is corrupt: Cannot free unaligned cluster 0x52a00; further non-fatal corruption events will be suppressed 163discard 65536/65536 bytes at offset 0 16464 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 165 166=== Testing read-only corruption report === 167 168Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 169wrote 65536/65536 bytes at offset 0 17064 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 171qcow2: Image is corrupt: Cluster allocation offset 0x52a00 unaligned (L2 offset: 0x40000, L2 index: 0); further non-fatal corruption events will be suppressed 172read failed: Input/output error 173read failed: Input/output error 174 175=== Testing non-fatal and then fatal corruption report === 176 177Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 178wrote 131072/131072 bytes at offset 0 179128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 180qcow2: Image is corrupt: Cannot free unaligned cluster 0x52a00; further non-fatal corruption events will be suppressed 181qcow2: Marking image as corrupt: Cluster allocation offset 0x62a00 unaligned (L2 offset: 0x40000, L2 index: 0x1); further corruption events will be suppressed 182discard 65536/65536 bytes at offset 0 18364 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 184read failed: Input/output error 185 186=== Testing empty refcount table === 187 188Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 189qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps with refcount table); further corruption events will be suppressed 190write failed: Input/output error 191ERROR cluster 0 refcount=0 reference=1 192ERROR cluster 1 refcount=0 reference=1 193ERROR cluster 3 refcount=0 reference=1 194Rebuilding refcount structure 195Repairing cluster 1 refcount=1 reference=0 196The following inconsistencies were found and repaired: 197 198 0 leaked clusters 199 3 corruptions 200 201Double checking the fixed image now... 202No errors were found on the image. 203 204=== Testing empty refcount table with valid L1 and L2 tables === 205 206Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 207wrote 65536/65536 bytes at offset 0 20864 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 209qcow2: Marking image as corrupt: Preventing invalid allocation of refcount block at offset 0; further corruption events will be suppressed 210write failed: Input/output error 211ERROR cluster 0 refcount=0 reference=1 212ERROR cluster 1 refcount=0 reference=1 213ERROR cluster 3 refcount=0 reference=1 214ERROR cluster 4 refcount=0 reference=1 215ERROR cluster 5 refcount=0 reference=1 216Rebuilding refcount structure 217Repairing cluster 1 refcount=1 reference=0 218The following inconsistencies were found and repaired: 219 220 0 leaked clusters 221 5 corruptions 222 223Double checking the fixed image now... 224No errors were found on the image. 225 226=== Testing empty refcount block === 227 228Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 229qcow2: Marking image as corrupt: Preventing invalid allocation of L2 table at offset 0; further corruption events will be suppressed 230write failed: Input/output error 231ERROR cluster 0 refcount=0 reference=1 232ERROR cluster 1 refcount=0 reference=1 233ERROR cluster 2 refcount=0 reference=1 234ERROR cluster 3 refcount=0 reference=1 235Rebuilding refcount structure 236Repairing cluster 1 refcount=1 reference=0 237Repairing cluster 2 refcount=1 reference=0 238The following inconsistencies were found and repaired: 239 240 0 leaked clusters 241 4 corruptions 242 243Double checking the fixed image now... 244No errors were found on the image. 245 246=== Testing empty refcount block with compressed write === 247 248Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 249wrote 65536/65536 bytes at offset 65536 25064 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 251qcow2: Marking image as corrupt: Preventing invalid allocation of compressed cluster at offset 0; further corruption events will be suppressed 252write failed: Input/output error 253ERROR cluster 0 refcount=0 reference=1 254ERROR cluster 1 refcount=0 reference=1 255ERROR cluster 2 refcount=0 reference=1 256ERROR cluster 3 refcount=0 reference=1 257Rebuilding refcount structure 258Repairing cluster 1 refcount=1 reference=0 259Repairing cluster 2 refcount=1 reference=0 260The following inconsistencies were found and repaired: 261 262 0 leaked clusters 263 4 corruptions 264 265Double checking the fixed image now... 266No errors were found on the image. 267 268=== Testing zero refcount table size === 269 270Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 271qemu-io: can't open device TEST_DIR/t.IMGFMT: Image does not contain a reference count table 272ERROR cluster 0 refcount=0 reference=1 273ERROR cluster 3 refcount=0 reference=1 274Rebuilding refcount structure 275The following inconsistencies were found and repaired: 276 277 0 leaked clusters 278 2 corruptions 279 280Double checking the fixed image now... 281No errors were found on the image. 282 283=== Testing incorrect refcount table offset === 284 285Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 286qcow2: Marking image as corrupt: Preventing invalid allocation of L2 table at offset 0; further corruption events will be suppressed 287write failed: Input/output error 288 289=== Testing dirty corrupt image === 290 291Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 292ERROR refcount block 0 is not cluster aligned; refcount table entry corrupted 293IMGFMT: Marking image as corrupt: Refblock offset 0xffff2a00 unaligned (reftable index: 0); further corruption events will be suppressed 294Can't get refcount for cluster 0: Input/output error 295Can't get refcount for cluster 1: Input/output error 296Can't get refcount for cluster 2: Input/output error 297Can't get refcount for cluster 3: Input/output error 298Rebuilding refcount structure 299Repairing cluster 1 refcount=1 reference=0 300qemu-io: can't open device TEST_DIR/t.IMGFMT: Could not repair dirty image: Input/output error 301--- Repairing --- 302Leaked cluster 1 refcount=1 reference=0 303Repairing cluster 1 refcount=1 reference=0 304The following inconsistencies were found and repaired: 305 306 1 leaked clusters 307 0 corruptions 308 309Double checking the fixed image now... 310No errors were found on the image. 311 312=== Writing to an unaligned preallocated zero cluster === 313 314Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 315wrote 65536/65536 bytes at offset 0 31664 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 317discard 65536/65536 bytes at offset 0 31864 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 319qcow2: Marking image as corrupt: Preallocated zero cluster offset 0x2a00 unaligned (guest offset: 0); further corruption events will be suppressed 320write failed: Input/output error 321--- Repairing --- 322Repairing offset=2a00: Preallocated zero cluster is not properly aligned; L2 entry corrupted. 323The following inconsistencies were found and repaired: 324 325 0 leaked clusters 326 1 corruptions 327 328Double checking the fixed image now... 329No errors were found on the image. 330 331=== Discarding with an unaligned refblock === 332 333Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 334wrote 131072/131072 bytes at offset 0 335128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 336qcow2: Marking image as corrupt: Refblock offset 0x2a00 unaligned (reftable index: 0); further corruption events will be suppressed 337qcow2_free_clusters failed: Input/output error 338discard failed: No medium found 339--- Repairing --- 340ERROR refcount block 0 is not cluster aligned; refcount table entry corrupted 341qcow2: Marking image as corrupt: Refblock offset 0x2a00 unaligned (reftable index: 0); further corruption events will be suppressed 342Can't get refcount for cluster 0: Input/output error 343Can't get refcount for cluster 1: Input/output error 344Can't get refcount for cluster 2: Input/output error 345Can't get refcount for cluster 3: Input/output error 346Can't get refcount for cluster 4: Input/output error 347Can't get refcount for cluster 5: Input/output error 348Can't get refcount for cluster 6: Input/output error 349Rebuilding refcount structure 350Repairing cluster 1 refcount=1 reference=0 351qemu-img: Check failed: No medium found 352Leaked cluster 1 refcount=1 reference=0 353Repairing cluster 1 refcount=1 reference=0 354The following inconsistencies were found and repaired: 355 356 1 leaked clusters 357 0 corruptions 358 359Double checking the fixed image now... 360No errors were found on the image. 361 362=== Discarding an out-of-bounds refblock === 363 364Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 365qcow2: Marking image as corrupt: Refblock at 0xffffff00000000 is not covered by the refcount structures; further corruption events will be suppressed 366qemu-img: Failed to discard unused refblocks: Input/output error 367--- Checking and retrying --- 368virtual size: 64 MiB (67108864 bytes) 369No errors were found on the image. 370Image resized. 371virtual size: 32 MiB (33554432 bytes) 372 373=== Discarding a non-covered in-bounds refblock === 374 375Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 376qcow2: Marking image as corrupt: Refblock at 0x1000000000 is not covered by the refcount structures; further corruption events will be suppressed 377qemu-img: Failed to discard unused refblocks: Input/output error 378--- Checking and retrying --- 379virtual size: 64 MiB (67108864 bytes) 380No errors were found on the image. 381Image resized. 382virtual size: 32 MiB (33554432 bytes) 383 384=== Discarding a refblock covered by an unaligned refblock === 385 386Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 387qcow2: Marking image as corrupt: Cannot get entry from refcount block cache: Offset 0x200 is unaligned; further corruption events will be suppressed 388qemu-img: Failed to discard unused refblocks: Input/output error 389--- Repairing --- 390Repairing refcount block 1 is outside image 391ERROR refcount block 2 is not cluster aligned; refcount table entry corrupted 392qcow2: Marking image as corrupt: Refblock offset 0x200 unaligned (reftable index: 0x2); further corruption events will be suppressed 393Can't get refcount for cluster 1048576: Input/output error 394Rebuilding refcount structure 395Repairing cluster 1 refcount=1 reference=0 396Repairing cluster 2 refcount=1 reference=0 397Repairing cluster 1048576 refcount=1 reference=0 398qemu-img: Check failed: No medium found 399Leaked cluster 1 refcount=1 reference=0 400Leaked cluster 2 refcount=1 reference=0 401Leaked cluster 1048576 refcount=1 reference=0 402Repairing cluster 1 refcount=1 reference=0 403Repairing cluster 2 refcount=1 reference=0 404Repairing cluster 1048576 refcount=1 reference=0 405The following inconsistencies were found and repaired: 406 407 3 leaked clusters 408 0 corruptions 409 410Double checking the fixed image now... 411No errors were found on the image. 412 413=== Testing the QEMU shutdown with a corrupted image === 414 415Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 416qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps with refcount table); further corruption events will be suppressed 417QMP_VERSION 418{"return": {}} 419{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_IMAGE_CORRUPTED", "data": {"device": "none0", "msg": "Preventing invalid write on metadata (overlaps with refcount table)", "offset": 65536, "node-name": "drive", "fatal": true, "size": 65536}} 420write failed: Input/output error 421{"return": ""} 422{"return": {}} 423{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} 424 425=== Testing incoming inactive corrupted image === 426 427Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 428QMP_VERSION 429{"return": {}} 430qcow2: Image is corrupt: L2 table offset 0x2a2a2a00 unaligned (L1 index: 0); further non-fatal corruption events will be suppressed 431{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_IMAGE_CORRUPTED", "data": {"device": "", "msg": "L2 table offset 0x2a2a2a00 unaligned (L1 index: 0)", "node-name": "drive", "fatal": false}} 432{"return": ""} 433{"return": {}} 434{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} 435 436 corrupt: false 437*** done 438