From: Max Reitz Date: Fri, 30 Aug 2013 12:34:30 +0000 (+0200) Subject: qcow2_check: Mark image consistent X-Git-Tag: v1.7.0-rc0~136^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=24530f3e060c71b6c57c7a70336f08a13a8b0a3d;p=thirdparty%2Fqemu.git 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 Signed-off-by: Kevin Wolf --- diff --git a/block/qcow2.c b/block/qcow2.c index 05e002d856e..4bc679a155f 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; }