btrfs-progs: Add helper function find_file_name/type for nlink and inode_item repair.
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Tue, 9 Dec 2014 08:27:28 +0000 (16:27 +0800)
committerDavid Sterba <dsterba@suse.cz>
Wed, 10 Dec 2014 12:44:53 +0000 (13:44 +0100)
commit15bc913158710ce6c5bc9e48d902b36ff89f8d18
treee9e27b4f11c9733fe85f57fd90a4444aa0cba282
parent1c4d47c037c78cce4c3d5ad7502387ebfd4370cb
btrfs-progs: Add helper function find_file_name/type for nlink and inode_item repair.

Add find_file_name() and find_file_type() function for later nlink and
inode_item repair.

Later nlink repair will use both function and and inode_item repair will
use find_file_type().

They are done by searching the backref list, dir_item/index for type
search and dir_item/index or inode_ref for name search.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
cmds-check.c