btrfs-progs: check: report more specific info about invalid location

Previously, it was so useless to print message like
"invalid location %d".

Let it print objectid and offset of the dir_item too.

Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Su Yue 2017-11-22 10:17:16 +08:00 committed by David Sterba
parent 6e8571e2df
commit 561cef3738

View File

@ -1635,8 +1635,9 @@ static int process_dir_item(struct extent_buffer *eb,
namebuf, len, filetype,
key->type, error);
} else {
fprintf(stderr, "invalid location in dir item %u\n",
location.type);
fprintf(stderr,
"unknown location type %d in DIR_ITEM[%llu %llu]\n",
location.type, key->objectid, key->offset);
add_inode_backref(inode_cache, BTRFS_MULTIPLE_OBJECTIDS,
key->objectid, key->offset, namebuf,
len, filetype, key->type, error);