btrfs-progs: check: Enhance leaf traversal function to handle missing inode item
The leaf traversal function in lowmem mode will skip to the first inode
item of leaf and begin to check the inode.
That's designed to avoid checking overlapping part of a leaf.
But that will cause problem in fsck/010 test case, as in that case inode
item of the first inode(256) is missing.
So above traversal will check from inode 257 and found nothing wrong.
The fix is done in 2 part:
1) Manually check the first inode
To avoid case like fsck/010
2) Check inode if ino changes from the first ino of a leaf
To avoid missing inode_item problem.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>