summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2018-02-27 17:12:58 +0800
committerDavid Sterba <dsterba@suse.com>2018-06-07 16:32:03 +0200
commitccb3ddb695c804f2f028e8c9cbf6cc282ce1ce58 (patch)
tree00e7a1ce25b26fe2fd1e68b037cd4457be599787
parent40b6bc1cb6a8b237c4ca5fb0bd315215a886d400 (diff)
btrfs-progs: check: Continue check even if csum error is found
Since data csum mismatch is not a fatal error compared to fs/extent trees, continue check. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--check/main.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/check/main.c b/check/main.c
index ed323e7f..490506f5 100644
--- a/check/main.c
+++ b/check/main.c
@@ -9861,11 +9861,13 @@ int cmd_check(int argc, char **argv)
fprintf(stderr, "checking csums\n");
ret = check_csums(root);
- err |= !!ret;
- if (ret) {
+ /*
+ * Data csum error is not fatal, and it may indicate more serious
+ * corruption, continue checking.
+ */
+ if (ret)
error("errors found in csum tree");
- goto out;
- }
+ err |= !!ret;
fprintf(stderr, "checking root refs\n");
/* For low memory mode, check_fs_roots_v2 handles root refs */