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>
This commit is contained in:
Qu Wenruo 2018-02-27 17:12:58 +08:00 committed by David Sterba
parent 40b6bc1cb6
commit ccb3ddb695
1 changed files with 6 additions and 4 deletions

View File

@ -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 */