diff options
author | Qu Wenruo <wqu@suse.com> | 2018-05-07 15:46:27 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-06-07 16:37:32 +0200 |
commit | 9e061cae1971ed1933f171378e46a5e52134afbd (patch) | |
tree | 93f4661db890948342c8d77da27385c5012644a5 /tests/misc-tests | |
parent | 8a7b9c9b47f9ff0d56ee016f3d2794112e9e822c (diff) |
btrfs-progs: print-tree: Avoid segfault for heavily corrupted item pointers
Normally corrupted leaf should be caught by csum check, but sometimes
corrupted item pointers (out of leaf range) can still pass csum check.
In fact, our fsck/005 test case image has such corrupted item pointer
and btrfs check can surprisingly fix it.
Anyway, make print-tree to skip such item and remaining slots to avoid
segfault.
Please note that, in btrfs-progs we can't put such check into
check_tree_block() nor do kernel level comprehensive check as under
certain case, btrfs-progs can handle or even repair it.
A strict check_tree_block() or backporting kernel btrfs_check_leaf()
could break such test cases and reduce the utility of btrfs-progs.
Issue: #128
Reported-by: Hubert Kario <hubert@kario.pl>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tests/misc-tests')
0 files changed, 0 insertions, 0 deletions