Print the root generation in btrfs-debug-tree
authorChris Mason <chris.mason@oracle.com>
Wed, 15 Dec 2010 21:03:00 +0000 (16:03 -0500)
committerChris Mason <chris.mason@oracle.com>
Tue, 25 Oct 2011 13:51:11 +0000 (09:51 -0400)
Signed-off-by: Chris Mason <chris.mason@oracle.com>
print-tree.c

index 59c23c5..6039699 100644 (file)
@@ -504,11 +504,12 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l)
                case BTRFS_ROOT_ITEM_KEY:
                        ri = btrfs_item_ptr(l, i, struct btrfs_root_item);
                        read_extent_buffer(l, &root_item, (unsigned long)ri, sizeof(root_item));
-                       printf("\t\troot data bytenr %llu level %d dirid %llu refs %u\n",
+                       printf("\t\troot data bytenr %llu level %d dirid %llu refs %u gen %llu\n",
                                (unsigned long long)btrfs_root_bytenr(&root_item),
                                btrfs_root_level(&root_item),
                                (unsigned long long)btrfs_root_dirid(&root_item),
-                               btrfs_root_refs(&root_item));
+                               btrfs_root_refs(&root_item),
+                               (unsigned long long)btrfs_root_generation(&root_item));
                        if (btrfs_root_refs(&root_item) == 0) {
                                struct btrfs_key drop_key;
                                btrfs_disk_key_to_cpu(&drop_key,