mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-09 01:47:20 -04:00
btrfs: print-tree: print information about dir log items
We currently don't print information about dir log items (other than the key, item offset and item size), which is useful to look at when debugging problems with a log tree. So print their specific information (currently they only have an end index number) in a format similar to btrfs-progs. Reviewed-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
committed by
David Sterba
parent
7317555f45
commit
7d2197b5dc
@@ -317,6 +317,14 @@ static void print_inode_extref_item(const struct extent_buffer *eb, int i)
|
||||
}
|
||||
}
|
||||
|
||||
static void print_dir_log_index_item(const struct extent_buffer *eb, int i)
|
||||
{
|
||||
struct btrfs_dir_log_item *dlog;
|
||||
|
||||
dlog = btrfs_item_ptr(eb, i, struct btrfs_dir_log_item);
|
||||
pr_info("\t\tdir log end %llu\n", btrfs_dir_log_end(eb, dlog));
|
||||
}
|
||||
|
||||
void btrfs_print_leaf(const struct extent_buffer *l)
|
||||
{
|
||||
struct btrfs_fs_info *fs_info;
|
||||
@@ -362,6 +370,9 @@ void btrfs_print_leaf(const struct extent_buffer *l)
|
||||
case BTRFS_XATTR_ITEM_KEY:
|
||||
print_dir_item(l, i);
|
||||
break;
|
||||
case BTRFS_DIR_LOG_INDEX_KEY:
|
||||
print_dir_log_index_item(l, i);
|
||||
break;
|
||||
case BTRFS_ROOT_ITEM_KEY:
|
||||
ri = btrfs_item_ptr(l, i, struct btrfs_root_item);
|
||||
pr_info("\t\troot data bytenr %llu refs %u\n",
|
||||
|
||||
Reference in New Issue
Block a user