btrfs-progs: check: report more specific info about invalid location
authorSu Yue <suy.fnst@cn.fujitsu.com>
Wed, 22 Nov 2017 02:17:16 +0000 (10:17 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 8 Jan 2018 19:04:10 +0000 (20:04 +0100)
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>
cmds-check.c

index ce8fd6e..a874c9e 100644 (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);