diff options
| author | Filipe Manana <fdmanana@suse.com> | 2025-09-12 17:43:46 +0100 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-09-23 08:49:22 +0200 |
| commit | 7d2197b5dc0cd02e9758fd4dd0d1e7e3707dfbe7 (patch) | |
| tree | 75817751ed192345c4788d1e05911060841b93d0 /fs/btrfs/print-tree.c | |
| parent | 7317555f4553aaec9dc732e24c88b8258b3c9deb (diff) | |
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>
Diffstat (limited to 'fs/btrfs/print-tree.c')
| -rw-r--r-- | fs/btrfs/print-tree.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c index 0a2a6e82a3bf..a66aced1d29c 100644 --- a/fs/btrfs/print-tree.c +++ b/fs/btrfs/print-tree.c @@ -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", |