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) 108discard 65536/65536 bytes at offset 0 10964 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 110qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps with active L2 table); further corruption events will be suppressed 111blkdebug: Suspended request '0' 112write failed: Input/output error 113blkdebug: Resuming request '0' 114aio_write failed: No medium found 115 116=== Testing unallocated image header === 117 118Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 119wrote 65536/65536 bytes at offset 0 12064 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 121qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps with qcow2_header); further corruption events will be suppressed 122write failed: Input/output error 123 124=== Testing unaligned L1 entry === 125 126Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 127wrote 65536/65536 bytes at offset 0 12864 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 129qcow2: Marking image as corrupt: L2 table offset 0x42a00 unaligned (L1 index: 0); further corruption events will be suppressed 130read failed: Input/output error 131Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 132wrote 65536/65536 bytes at offset 0 13364 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 134qcow2: Marking image as corrupt: L2 table offset 0x42a00 unaligned (L1 index: 0); further corruption events will be suppressed 135qemu-img: Failed to turn zero into data clusters: Input/output error 136 137=== Testing unaligned L2 entry === 138 139Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 140wrote 65536/65536 bytes at offset 0 14164 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 142qcow2: Marking image as corrupt: Cluster allocation offset 0x52a00 unaligned (L2 offset: 0x40000, L2 index: 0); further corruption events will be suppressed 143read failed: Input/output error 144 145=== Testing unaligned pre-allocated zero cluster === 146 147Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 148wrote 65536/65536 bytes at offset 0 14964 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 150qcow2: Marking image as corrupt: Cluster allocation offset 0x52a00 unaligned (L2 offset: 0x40000, L2 index: 0); further corruption events will be suppressed 151qemu-img: Failed to turn zero into data clusters: Input/output error 152 153=== Testing unaligned reftable entry === 154 155Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 156qcow2: Marking image as corrupt: Refblock offset 0x22a00 unaligned (reftable index: 0); further corruption events will be suppressed 157write failed: Input/output error 158 159=== Testing non-fatal corruption on freeing === 160 161Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 162wrote 65536/65536 bytes at offset 0 16364 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 164qcow2: Image is corrupt: Cannot free unaligned cluster 0x52a00; further non-fatal corruption events will be suppressed 165discard 65536/65536 bytes at offset 0 16664 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 167 168=== Testing read-only corruption report === 169 170Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 171wrote 65536/65536 bytes at offset 0 17264 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 173qcow2: Image is corrupt: Cluster allocation offset 0x52a00 unaligned (L2 offset: 0x40000, L2 index: 0); further non-fatal corruption events will be suppressed 174read failed: Input/output error 175read failed: Input/output error 176 177=== Testing non-fatal and then fatal corruption report === 178 179Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 180wrote 131072/131072 bytes at offset 0 181128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 182qcow2: Image is corrupt: Cannot free unaligned cluster 0x52a00; further non-fatal corruption events will be suppressed 183qcow2: Marking image as corrupt: Cluster allocation offset 0x62a00 unaligned (L2 offset: 0x40000, L2 index: 0x1); further corruption events will be suppressed 184discard 65536/65536 bytes at offset 0 18564 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 186read failed: Input/output error 187 188=== Testing empty refcount table === 189 190Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 191qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps with refcount table); further corruption events will be suppressed 192write failed: Input/output error 193ERROR cluster 0 refcount=0 reference=1 194ERROR cluster 1 refcount=0 reference=1 195ERROR cluster 3 refcount=0 reference=1 196Rebuilding refcount structure 197Repairing cluster 1 refcount=1 reference=0 198The following inconsistencies were found and repaired: 199 200 0 leaked clusters 201 3 corruptions 202 203Double checking the fixed image now... 204No errors were found on the image. 205 206=== Testing empty refcount table with valid L1 and L2 tables === 207 208Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 209wrote 65536/65536 bytes at offset 0 21064 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 211qcow2: Marking image as corrupt: Preventing invalid allocation of refcount block at offset 0; further corruption events will be suppressed 212write failed: Input/output error 213ERROR cluster 0 refcount=0 reference=1 214ERROR cluster 1 refcount=0 reference=1 215ERROR cluster 3 refcount=0 reference=1 216ERROR cluster 4 refcount=0 reference=1 217ERROR cluster 5 refcount=0 reference=1 218Rebuilding refcount structure 219Repairing cluster 1 refcount=1 reference=0 220The following inconsistencies were found and repaired: 221 222 0 leaked clusters 223 5 corruptions 224 225Double checking the fixed image now... 226No errors were found on the image. 227 228=== Testing empty refcount block === 229 230Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 231qcow2: Marking image as corrupt: Preventing invalid allocation of L2 table at offset 0; further corruption events will be suppressed 232write failed: Input/output error 233ERROR cluster 0 refcount=0 reference=1 234ERROR cluster 1 refcount=0 reference=1 235ERROR cluster 2 refcount=0 reference=1 236ERROR cluster 3 refcount=0 reference=1 237Rebuilding refcount structure 238Repairing cluster 1 refcount=1 reference=0 239Repairing cluster 2 refcount=1 reference=0 240The following inconsistencies were found and repaired: 241 242 0 leaked clusters 243 4 corruptions 244 245Double checking the fixed image now... 246No errors were found on the image. 247 248=== Testing empty refcount block with compressed write === 249 250Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 251wrote 65536/65536 bytes at offset 65536 25264 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 253qcow2: Marking image as corrupt: Preventing invalid allocation of compressed cluster at offset 0; further corruption events will be suppressed 254write failed: Input/output error 255ERROR cluster 0 refcount=0 reference=1 256ERROR cluster 1 refcount=0 reference=1 257ERROR cluster 2 refcount=0 reference=1 258ERROR cluster 3 refcount=0 reference=1 259Rebuilding refcount structure 260Repairing cluster 1 refcount=1 reference=0 261Repairing cluster 2 refcount=1 reference=0 262The following inconsistencies were found and repaired: 263 264 0 leaked clusters 265 4 corruptions 266 267Double checking the fixed image now... 268No errors were found on the image. 269 270=== Testing zero refcount table size === 271 272Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 273qemu-io: can't open device TEST_DIR/t.IMGFMT: Image does not contain a reference count table 274ERROR cluster 0 refcount=0 reference=1 275ERROR cluster 3 refcount=0 reference=1 276Rebuilding refcount structure 277The following inconsistencies were found and repaired: 278 279 0 leaked clusters 280 2 corruptions 281 282Double checking the fixed image now... 283No errors were found on the image. 284 285=== Testing incorrect refcount table offset === 286 287Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 288qcow2: Marking image as corrupt: Preventing invalid allocation of L2 table at offset 0; further corruption events will be suppressed 289write failed: Input/output error 290 291=== Testing dirty corrupt image === 292 293Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 294ERROR refcount block 0 is not cluster aligned; refcount table entry corrupted 295IMGFMT: Marking image as corrupt: Refblock offset 0xffff2a00 unaligned (reftable index: 0); further corruption events will be suppressed 296Can't get refcount for cluster 0: Input/output error 297Can't get refcount for cluster 1: Input/output error 298Can't get refcount for cluster 2: Input/output error 299Can't get refcount for cluster 3: Input/output error 300Rebuilding refcount structure 301Repairing cluster 1 refcount=1 reference=0 302qemu-io: can't open device TEST_DIR/t.IMGFMT: Could not repair dirty image: Input/output error 303--- Repairing --- 304Leaked cluster 1 refcount=1 reference=0 305Repairing cluster 1 refcount=1 reference=0 306The following inconsistencies were found and repaired: 307 308 1 leaked clusters 309 0 corruptions 310 311Double checking the fixed image now... 312No errors were found on the image. 313 314=== Writing to an unaligned preallocated zero cluster === 315 316Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 317wrote 65536/65536 bytes at offset 0 31864 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 319discard 65536/65536 bytes at offset 0 32064 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 321qcow2: Marking image as corrupt: Preallocated zero cluster offset 0x2a00 unaligned (guest offset: 0); further corruption events will be suppressed 322write failed: Input/output error 323--- Repairing --- 324Repairing offset=2a00: Preallocated zero cluster is not properly aligned; L2 entry corrupted. 325The following inconsistencies were found and repaired: 326 327 0 leaked clusters 328 1 corruptions 329 330Double checking the fixed image now... 331No errors were found on the image. 332 333=== Discarding with an unaligned refblock === 334 335Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 336wrote 131072/131072 bytes at offset 0 337128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 338qcow2: Marking image as corrupt: Refblock offset 0x2a00 unaligned (reftable index: 0); further corruption events will be suppressed 339qcow2_free_clusters failed: Input/output error 340discard failed: No medium found 341--- Repairing --- 342ERROR refcount block 0 is not cluster aligned; refcount table entry corrupted 343qcow2: Marking image as corrupt: Refblock offset 0x2a00 unaligned (reftable index: 0); further corruption events will be suppressed 344Can't get refcount for cluster 0: Input/output error 345Can't get refcount for cluster 1: Input/output error 346Can't get refcount for cluster 2: Input/output error 347Can't get refcount for cluster 3: Input/output error 348Can't get refcount for cluster 4: Input/output error 349Can't get refcount for cluster 5: Input/output error 350Can't get refcount for cluster 6: Input/output error 351Rebuilding refcount structure 352Repairing cluster 1 refcount=1 reference=0 353qemu-img: Check failed: No medium found 354Leaked cluster 1 refcount=1 reference=0 355Repairing cluster 1 refcount=1 reference=0 356The following inconsistencies were found and repaired: 357 358 1 leaked clusters 359 0 corruptions 360 361Double checking the fixed image now... 362No errors were found on the image. 363 364=== Discarding an out-of-bounds refblock === 365 366Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 367qcow2: Marking image as corrupt: Refblock at 0xffffff00000000 is not covered by the refcount structures; further corruption events will be suppressed 368qemu-img: Failed to discard unused refblocks: Input/output error 369--- Checking and retrying --- 370virtual size: 64 MiB (67108864 bytes) 371No errors were found on the image. 372Image resized. 373virtual size: 32 MiB (33554432 bytes) 374 375=== Discarding a non-covered in-bounds refblock === 376 377Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 378qcow2: Marking image as corrupt: Refblock at 0x1000000000 is not covered by the refcount structures; further corruption events will be suppressed 379qemu-img: Failed to discard unused refblocks: Input/output error 380--- Checking and retrying --- 381virtual size: 64 MiB (67108864 bytes) 382No errors were found on the image. 383Image resized. 384virtual size: 32 MiB (33554432 bytes) 385 386=== Discarding a refblock covered by an unaligned refblock === 387 388Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 389qcow2: Marking image as corrupt: Cannot get entry from refcount block cache: Offset 0x200 is unaligned; further corruption events will be suppressed 390qemu-img: Failed to discard unused refblocks: Input/output error 391--- Repairing --- 392Repairing refcount block 1 is outside image 393ERROR refcount block 2 is not cluster aligned; refcount table entry corrupted 394qcow2: Marking image as corrupt: Refblock offset 0x200 unaligned (reftable index: 0x2); further corruption events will be suppressed 395Can't get refcount for cluster 1048576: Input/output error 396Rebuilding refcount structure 397Repairing cluster 1 refcount=1 reference=0 398Repairing cluster 2 refcount=1 reference=0 399Repairing cluster 1048576 refcount=1 reference=0 400qemu-img: Check failed: No medium found 401Leaked cluster 1 refcount=1 reference=0 402Leaked cluster 2 refcount=1 reference=0 403Leaked cluster 1048576 refcount=1 reference=0 404Repairing cluster 1 refcount=1 reference=0 405Repairing cluster 2 refcount=1 reference=0 406Repairing cluster 1048576 refcount=1 reference=0 407The following inconsistencies were found and repaired: 408 409 3 leaked clusters 410 0 corruptions 411 412Double checking the fixed image now... 413No errors were found on the image. 414 415=== Testing the QEMU shutdown with a corrupted image === 416 417Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 418qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps with refcount table); further corruption events will be suppressed 419QMP_VERSION 420{"return": {}} 421{"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}} 422write failed: Input/output error 423{"return": ""} 424{"return": {}} 425{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} 426 427=== Testing incoming inactive corrupted image === 428 429Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 430QMP_VERSION 431{"return": {}} 432qcow2: Image is corrupt: L2 table offset 0x2a2a2a00 unaligned (L1 index: 0); further non-fatal corruption events will be suppressed 433{"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}} 434{"return": ""} 435{"return": {}} 436{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} 437 438 corrupt: false 439*** done 440