mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
qcow2: check_errors are fatal
When trying to repair a dirty image, qcow2_check() may apparently succeed (no really fatal error occurred that would prevent the check from continuing), but if check_errors in the result object is non-zero, we cannot trust the image to be usable. Reported-by: R. Nageswara Sastry <nasastry@in.ibm.com> Buglink: https://bugs.launchpad.net/qemu/+bug/1728639 Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20171110203111.7666-2-mreitz@redhat.com Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
3e3b838ffe
commit
791fff504c
3 changed files with 47 additions and 1 deletions
|
@ -284,4 +284,27 @@ No errors were found on the image.
|
|||
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
|
||||
qcow2: Marking image as corrupt: Preventing invalid allocation of L2 table at offset 0; further corruption events will be suppressed
|
||||
write failed: Input/output error
|
||||
|
||||
=== Testing dirty corrupt image ===
|
||||
|
||||
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
|
||||
ERROR refcount block 0 is not cluster aligned; refcount table entry corrupted
|
||||
IMGFMT: Marking image as corrupt: Refblock offset 0xffff2a00 unaligned (reftable index: 0); further corruption events will be suppressed
|
||||
Can't get refcount for cluster 0: Input/output error
|
||||
Can't get refcount for cluster 1: Input/output error
|
||||
Can't get refcount for cluster 2: Input/output error
|
||||
Can't get refcount for cluster 3: Input/output error
|
||||
Rebuilding refcount structure
|
||||
Repairing cluster 1 refcount=1 reference=0
|
||||
can't open device TEST_DIR/t.IMGFMT: Could not repair dirty image: Input/output error
|
||||
--- Repairing ---
|
||||
Leaked cluster 1 refcount=1 reference=0
|
||||
Repairing cluster 1 refcount=1 reference=0
|
||||
The following inconsistencies were found and repaired:
|
||||
|
||||
1 leaked clusters
|
||||
0 corruptions
|
||||
|
||||
Double checking the fixed image now...
|
||||
No errors were found on the image.
|
||||
*** done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue