mirror of
https://github.com/kdave/btrfs-progs
synced 2025-03-01 16:30:50 +00:00
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:
parent
40b6bc1cb6
commit
ccb3ddb695
10
check/main.c
10
check/main.c
@ -9861,11 +9861,13 @@ int cmd_check(int argc, char **argv)
|
|||||||
|
|
||||||
fprintf(stderr, "checking csums\n");
|
fprintf(stderr, "checking csums\n");
|
||||||
ret = check_csums(root);
|
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");
|
error("errors found in csum tree");
|
||||||
goto out;
|
err |= !!ret;
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(stderr, "checking root refs\n");
|
fprintf(stderr, "checking root refs\n");
|
||||||
/* For low memory mode, check_fs_roots_v2 handles root refs */
|
/* For low memory mode, check_fs_roots_v2 handles root refs */
|
||||||
|
Loading…
Reference in New Issue
Block a user