summaryrefslogtreecommitdiff
path: root/print-tree.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-03-26 11:24:42 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-03-26 11:24:42 -0400
commit132db51b1f205ff2a85c9e44d44daab296b90e30 (patch)
treed0e7eb3446c047df2f4fca66e9cb7ec001352fcc /print-tree.c
parent9fb549a6c1ccc19b2cf7e403aeed51688ff9aa7c (diff)
generations on headers
Diffstat (limited to 'print-tree.c')
-rw-r--r--print-tree.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/print-tree.c b/print-tree.c
index caa07f5a..5259b6e9 100644
--- a/print-tree.c
+++ b/print-tree.c
@@ -17,9 +17,11 @@ void btrfs_print_leaf(struct btrfs_root *root, struct btrfs_leaf *l)
struct btrfs_inode_item *ii;
u32 type;
- printf("leaf %Lu total ptrs %d free space %d\n",
+ printf("leaf %Lu ptrs %d free space %d parent %Lu generation %Lu\n",
btrfs_header_blocknr(&l->header), nr,
- btrfs_leaf_free_space(root, l));
+ btrfs_leaf_free_space(root, l),
+ btrfs_header_parentid(&l->header),
+ btrfs_header_generation(&l->header));
fflush(stdout);
for (i = 0 ; i < nr ; i++) {
item = l->items + i;
@@ -87,9 +89,12 @@ void btrfs_print_tree(struct btrfs_root *root, struct btrfs_buffer *t)
btrfs_print_leaf(root, (struct btrfs_leaf *)c);
return;
}
- printf("node %Lu level %d total ptrs %d free spc %u\n", t->blocknr,
+ printf("node %Lu level %d ptrs %d free %u parent %Lu generation %Lu\n",
+ t->blocknr,
btrfs_header_level(&c->header), nr,
- (u32)BTRFS_NODEPTRS_PER_BLOCK(root) - nr);
+ (u32)BTRFS_NODEPTRS_PER_BLOCK(root) - nr,
+ btrfs_header_parentid(&c->header),
+ btrfs_header_generation(&c->header));
fflush(stdout);
for (i = 0; i < nr; i++) {
printf("\tkey %d (%Lu %u %Lu) block %Lu\n",