btrfs: tree-checker: Enhance btrfs_check_node output
authorQu Wenruo <quwenruo.btrfs@gmx.com>
Mon, 9 Oct 2017 01:51:03 +0000 (01:51 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Dec 2018 18:41:12 +0000 (19:41 +0100)
commitb3032dc25fb4d7ffdbb61df875cc09b3ec662c85
tree7354a271f9387b9f459217c011d74c0d67543e8e
parenteb3493e2476c5ce60c6a376a6b50d465f2864968
btrfs: tree-checker: Enhance btrfs_check_node output

commit bba4f29896c986c4cec17bc0f19f2ce644fceae1 upstream.

Use inline function to replace macro since we don't need
stringification.
(Macro still exists until all callers get updated)

And add more info about the error, and replace EIO with EUCLEAN.

For nr_items error, report if it's too large or too small, and output
the valid value range.

For node block pointer, added a new alignment checker.

For key order, also output the next key to make the problem more
obvious.

Signed-off-by: Qu Wenruo <quwenruo.btrfs@gmx.com>
[ wording adjustments, unindented long strings ]
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/btrfs/tree-checker.c