btrfs: print extent buffers when sibling keys check fails
authorFilipe Manana <fdmanana@suse.com>
Wed, 26 Apr 2023 10:51:36 +0000 (11:51 +0100)
committerDavid Sterba <dsterba@suse.com>
Fri, 28 Apr 2023 14:36:39 +0000 (16:36 +0200)
commita2cea677db6099d71c9f70de7f907d3d7e6bec3b
treec19f443fd3b55f51019af352dabf1cc2dc7f71cd
parent9ae5afd02a03d4e22a17a9609b19400b77c36273
btrfs: print extent buffers when sibling keys check fails

When trying to move keys from one node/leaf to another sibling node/leaf,
if the sibling keys check fails we just print an error message with the
last key of the left sibling and the first key of the right sibling.
However it's also useful to print all the keys of each sibling, as it
may provide some clues to what went wrong, which code path may be
inserting keys in an incorrect order. So just do that, print the siblings
with btrfs_print_tree(), as it works for both leaves and nodes.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.c