OSDN Git Service

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)
committerDavid Sterba <dsterba@suse.com>
Mon, 30 Oct 2017 11:27:59 +0000 (12:27 +0100)
commitbba4f29896c986c4cec17bc0f19f2ce644fceae1
tree5018b65787d74bbe7b813980e25b48e670a4a145
parent557ea5dd003d371536f6b4e8f7c8209a2b6fd4e3
btrfs: tree-checker: Enhance btrfs_check_node output

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>
fs/btrfs/tree-checker.c