diff mbox

[3/4] btrfs-progs: check: Continue check even csum error is found

Message ID 20180227091259.10877-4-wqu@suse.com (mailing list archive)
State New, archived
Headers show

Commit Message

Qu Wenruo Feb. 27, 2018, 9:12 a.m. UTC
Since data csum is not a fatal error compared to fs/extent trees,
continue check.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 check/main.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/check/main.c b/check/main.c
index 15b3c402c9f5..22a78273be15 100644
--- a/check/main.c
+++ b/check/main.c
@@ -9847,11 +9847,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 indicates 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 */