Btrfs: return gracefully from balance if fs tree is corrupted
commit 3561b9db70928f207be4570b48fc19898eeaef54 upstream.
When relocating tree blocks, we firstly get block information from
back references in the extent tree, we then search fs tree to try to
find all parents of a block.
However, if fs tree is corrupted, eg. if there're some missing
items, we could come across these WARN_ONs and BUG_ONs.
This makes us print some error messages and return gracefully
Signed-off-by: Liu Bo <email@example.com>
Reviewed-by: Josef Bacik <firstname.lastname@example.org>
Signed-off-by: David Sterba <email@example.com>
Signed-off-by: Greg Kroah-Hartman <firstname.lastname@example.org>
1 file changed