diff options
author | Max Reitz <mreitz@redhat.com> | 2013-08-30 14:34:30 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-09-02 10:15:15 +0200 |
commit | 24530f3e060c71b6c57c7a70336f08a13a8b0a3d (patch) | |
tree | 1dfca891b973438bad5e7f8bbe9b9e8af7bc2aac /block | |
parent | afa50193cde574528a130a25544fd6f3aa8da069 (diff) | |
download | hqemu-24530f3e060c71b6c57c7a70336f08a13a8b0a3d.zip hqemu-24530f3e060c71b6c57c7a70336f08a13a8b0a3d.tar.gz |
qcow2_check: Mark image consistent
If no corruptions remain after an image repair (and no errors have been
encountered), clear the corrupt flag in qcow2_check.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/qcow2.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index 05e002d..4bc679a 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -312,7 +312,11 @@ static int qcow2_check(BlockDriverState *bs, BdrvCheckResult *result, } if (fix && result->check_errors == 0 && result->corruptions == 0) { - return qcow2_mark_clean(bs); + ret = qcow2_mark_clean(bs); + if (ret < 0) { + return ret; + } + return qcow2_mark_consistent(bs); } return ret; } |