On 22.03.2018 09:37, Qu Wenruo wrote:
> Just like what we did for leaf, also add this output to make it easier
> to distinguish tree reloc tree blocks.
>
> Signed-off-by: Qu Wenruo <wqu@xxxxxxxx>
Reviewed-by: Nikolay Borisov <nborisov@xxxxxxxx>
> ---
> print-tree.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/print-tree.c b/print-tree.c
> index d5bb413019bb..a82cdc945247 100644
> --- a/print-tree.c
> +++ b/print-tree.c
> @@ -1364,11 +1364,14 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *eb)
>
> void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *eb, int follow)
> {
> + u8 backref_rev;
> u32 i;
> u32 nr;
> + u64 flags;
> struct btrfs_disk_key disk_key;
> struct btrfs_key key;
> struct extent_buffer *next;
> + char flags_str[HEADER_FLAGS_BUF_LEN];
>
> if (!eb)
> return;
> @@ -1377,6 +1380,9 @@ void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *eb, int fol
> btrfs_print_leaf(root, eb);
> return;
> }
> + flags = btrfs_header_flags(eb) & ~BTRFS_BACKREF_REV_MASK;
> + backref_rev = btrfs_header_flags(eb) >> BTRFS_BACKREF_REV_SHIFT;
> + header_flags_to_str(flags, flags_str);
> printf("node %llu level %d items %d free %u generation %llu owner ",
> (unsigned long long)eb->start,
> btrfs_header_level(eb), nr,
> @@ -1384,6 +1390,8 @@ void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *eb, int fol
> (unsigned long long)btrfs_header_generation(eb));
> print_objectid(stdout, btrfs_header_owner(eb), 0);
> printf("\n");
> + printf("node %llu flags 0x%llx(%s) backref revision %d\n",
> + eb->start, flags, flags_str, backref_rev);
> print_uuids(eb);
> fflush(stdout);
> for (i = 0; i < nr; i++) {
>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html