diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-03-13 16:47:54 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-03-13 16:47:54 -0400 |
commit | 3768f3689fc76ecea17414936dff7a02746a4355 (patch) | |
tree | 0494b12e3ba0be0a25f122922e205bc91d88957b /fs/btrfs/print-tree.c | |
parent | eaee50e881b88766d9a781c54c4142456cf5e527 (diff) |
Btrfs: Change the super to point to a tree of trees to enable persistent snapshots
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/print-tree.c')
-rw-r--r-- | fs/btrfs/print-tree.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c index c95c85640aa9..64829b6b90f9 100644 --- a/fs/btrfs/print-tree.c +++ b/fs/btrfs/print-tree.c | |||
@@ -11,6 +11,7 @@ void btrfs_print_leaf(struct btrfs_leaf *l) | |||
11 | u32 nr = btrfs_header_nritems(&l->header); | 11 | u32 nr = btrfs_header_nritems(&l->header); |
12 | struct btrfs_item *item; | 12 | struct btrfs_item *item; |
13 | struct btrfs_extent_item *ei; | 13 | struct btrfs_extent_item *ei; |
14 | struct btrfs_root_item *ri; | ||
14 | printf("leaf %Lu total ptrs %d free space %d\n", | 15 | printf("leaf %Lu total ptrs %d free space %d\n", |
15 | btrfs_header_blocknr(&l->header), nr, btrfs_leaf_free_space(l)); | 16 | btrfs_header_blocknr(&l->header), nr, btrfs_leaf_free_space(l)); |
16 | fflush(stdout); | 17 | fflush(stdout); |
@@ -23,13 +24,15 @@ void btrfs_print_leaf(struct btrfs_leaf *l) | |||
23 | btrfs_key_offset(&item->key), | 24 | btrfs_key_offset(&item->key), |
24 | btrfs_item_offset(item), | 25 | btrfs_item_offset(item), |
25 | btrfs_item_size(item)); | 26 | btrfs_item_size(item)); |
26 | fflush(stdout); | ||
27 | printf("\t\titem data %.*s\n", btrfs_item_size(item), | 27 | printf("\t\titem data %.*s\n", btrfs_item_size(item), |
28 | l->data + btrfs_item_offset(item)); | 28 | l->data + btrfs_item_offset(item)); |
29 | ei = (struct btrfs_extent_item *)(l->data + | 29 | ei = (struct btrfs_extent_item *)(l->data + |
30 | btrfs_item_offset(item)); | 30 | btrfs_item_offset(item)); |
31 | printf("\t\textent data refs %u owner %Lu\n", ei->refs, | 31 | printf("\t\textent data refs %u owner %Lu\n", |
32 | ei->owner); | 32 | btrfs_extent_refs(ei), btrfs_extent_owner(ei)); |
33 | ri = (struct btrfs_root_item *)ei; | ||
34 | printf("\t\troot data blocknr %Lu refs %u\n", | ||
35 | btrfs_root_blocknr(ri), btrfs_root_refs(ri)); | ||
33 | fflush(stdout); | 36 | fflush(stdout); |
34 | } | 37 | } |
35 | } | 38 | } |
@@ -71,6 +74,5 @@ void btrfs_print_tree(struct btrfs_root *root, struct btrfs_buffer *t) | |||
71 | btrfs_print_tree(root, next_buf); | 74 | btrfs_print_tree(root, next_buf); |
72 | btrfs_block_release(root, next_buf); | 75 | btrfs_block_release(root, next_buf); |
73 | } | 76 | } |
74 | |||
75 | } | 77 | } |
76 | 78 | ||