summaryrefslogtreecommitdiff
path: root/block/qed-check.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2012-05-11 18:16:54 +0200
committerKevin Wolf <kwolf@redhat.com>2012-06-15 14:03:42 +0200
commitccf34716eeda0e3ad203c8a28f01efb412c56763 (patch)
tree46bb74acbf67d23a8586b1ce099cce15db363fc7 /block/qed-check.c
parent4534ff5426afeeae5238ba10a696cafa9a0168ee (diff)
downloadqemu-ccf34716eeda0e3ad203c8a28f01efb412c56763.tar.gz
qemu-img check: Print fixed clusters and recheck
When any inconsistencies have been fixed, print the statistics and run another check to make sure everything is correct now. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qed-check.c')
-rw-r--r--block/qed-check.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/qed-check.c b/block/qed-check.c
index 94327ff5b3..5edf60775b 100644
--- a/block/qed-check.c
+++ b/block/qed-check.c
@@ -87,6 +87,7 @@ static unsigned int qed_check_l2_table(QEDCheck *check, QEDTable *table)
if (!qed_check_cluster_offset(s, offset)) {
if (check->fix) {
table->offsets[i] = 0;
+ check->result->corruptions_fixed++;
} else {
check->result->corruptions++;
}
@@ -127,6 +128,7 @@ static int qed_check_l1_table(QEDCheck *check, QEDTable *table)
/* Clear invalid offset */
if (check->fix) {
table->offsets[i] = 0;
+ check->result->corruptions_fixed++;
} else {
check->result->corruptions++;
}