[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 25/26] qcow2_check: Mark image consistent
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 25/26] qcow2_check: Mark image consistent |
Date: |
Fri, 30 Aug 2013 16:30:50 +0200 |
From: Max Reitz <address@hidden>
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 <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/qcow2.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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;
}
--
1.8.1.4
- [Qemu-devel] [PULL 16/26] option: Add assigned flag to QEMUOptionParameter, (continued)
- [Qemu-devel] [PULL 16/26] option: Add assigned flag to QEMUOptionParameter, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 18/26] qemu-iotests: Snapshotting zero clusters, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 15/26] gluster: Abort on AIO completion failure, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 17/26] qcow2-refcount: Snapshot update for zero clusters, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 20/26] qcow2: Metadata overlap checks, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 19/26] qcow2: Add corrupt bit, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 22/26] qcow2-refcount: Move OFLAG_COPIED checks, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 21/26] qcow2: Employ metadata overlap checks, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 23/26] qcow2-refcount: Repair OFLAG_COPIED errors, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 24/26] qcow2-refcount: Repair shared refcount blocks, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 25/26] qcow2_check: Mark image consistent,
Kevin Wolf <=
- [Qemu-devel] [PULL 26/26] qemu-iotests: Overlapping cluster allocations, Kevin Wolf, 2013/08/30
- Re: [Qemu-devel] [PULL 00/26] Block patches, Anthony Liguori, 2013/08/30