btrfs-progs: check: change find_dir_index/item
authorSu Yue <suy.fnst@cn.fujitsu.com>
Mon, 28 Aug 2017 06:18:27 +0000 (14:18 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 Oct 2017 18:33:00 +0000 (20:33 +0200)
commit2f4bc981d6c8e4ca24ceb21c86172749a96cf3ff
treeb1dc6b4c44891fcb00862958f35b890ebc28c49b
parentf32ca721257a78010a7ed8c6870a09c1274de1b2
btrfs-progs: check: change find_dir_index/item

The changes in the patch is for further repair:
1.Introduce find_dir_index() to get the index by traversing items.

2.We should distinguish dir_index error and dir_item error.
However, there are only DIR_ITEM_MISSING and DIR_ITEM_MISMATCH.
Introduce marcos DIR_INDEX_MISSING and DIR_INDEX_MISMATCH
to represent index missing/mismatch.

3.Because find_dir_item() prints message right now if it detects any
error.
Remove message output now and next patches will introduce functions
to print error message.

Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
cmds-check.c