mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-30 15:00:34 +00:00
b41ad73a3b
This adds a test for an I/O error during snapshot deletion, and maybe more importantly, for how to repair the resulting image. If the snapshot has been deleted before the error occurs, the only negative result will be leaked clusters -- and those should be repairable with qemu-img check -r leaks. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20180509200059.31125-3-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
43 lines
1.4 KiB
Plaintext
43 lines
1.4 KiB
Plaintext
QA output created by 217
|
|
|
|
=== Simulating an I/O error during snapshot deletion ===
|
|
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
|
|
wrote 65536/65536 bytes at offset 0
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
|
Snapshot list:
|
|
(Snapshot filtered)
|
|
|
|
qcow2_free_clusters failed: Input/output error
|
|
qemu-img: Could not delete snapshot 'foo': Failed to free the cluster and L1 table: Input/output error
|
|
|
|
--- Checking test image ---
|
|
Leaked cluster 4 refcount=2 reference=1
|
|
Leaked cluster 5 refcount=2 reference=1
|
|
Leaked cluster 6 refcount=1 reference=0
|
|
Leaked cluster 7 refcount=1 reference=0
|
|
|
|
4 leaked clusters were found on the image.
|
|
This means waste of disk space, but no harm to data.
|
|
|
|
--- Repairing test image ---
|
|
Leaked cluster 4 refcount=2 reference=1
|
|
Leaked cluster 5 refcount=2 reference=1
|
|
Leaked cluster 6 refcount=1 reference=0
|
|
Leaked cluster 7 refcount=1 reference=0
|
|
Repairing cluster 4 refcount=2 reference=1
|
|
Repairing cluster 5 refcount=2 reference=1
|
|
Repairing cluster 6 refcount=1 reference=0
|
|
Repairing cluster 7 refcount=1 reference=0
|
|
Repairing OFLAG_COPIED L2 cluster: l1_index=0 l1_entry=40000 refcount=1
|
|
Repairing OFLAG_COPIED data cluster: l2_entry=50000 refcount=1
|
|
The following inconsistencies were found and repaired:
|
|
|
|
4 leaked clusters
|
|
2 corruptions
|
|
|
|
Double checking the fixed image now...
|
|
No errors were found on the image.
|
|
*** done
|