From ccb3ddb695c804f2f028e8c9cbf6cc282ce1ce58 Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Tue, 27 Feb 2018 17:12:58 +0800 Subject: [PATCH] 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 Signed-off-by: David Sterba --- check/main.c | 10 ++++++---- 1 file 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 */