summaryrefslogtreecommitdiff
path: root/print-tree.c
diff options
context:
space:
mode:
authorZheng Yan <zheng.yan@oracle.com>2008-09-23 12:29:10 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2008-09-23 12:29:10 -0400
commit428b7fa6302c97f5a79f4864a448f481b08a0dfe (patch)
tree59cdff5184e68da4bb3bd59c1737beea2b6c677d /print-tree.c
parentcea88ec1d7c61684b39a383996606b6e2f83bc21 (diff)
Full back reference support
This patch makes the back reference system to explicit record the location of parent node for all types of extents. The location of parent node is placed into the offset field of backref key. Every time a tree block is balanced, the back references for the affected lower level extents are updated.
Diffstat (limited to 'print-tree.c')
-rw-r--r--print-tree.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/print-tree.c b/print-tree.c
index d6d32a0e..ef85ef99 100644
--- a/print-tree.c
+++ b/print-tree.c
@@ -213,11 +213,12 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l)
case BTRFS_EXTENT_REF_KEY:
ref = btrfs_item_ptr(l, i, struct btrfs_extent_ref);
printf("\t\textent back ref root %llu gen %llu "
- "owner %llu offset %llu\n",
+ "owner %llu offset %llu, num_refs %lu\n",
(unsigned long long)btrfs_ref_root(l, ref),
(unsigned long long)btrfs_ref_generation(l, ref),
(unsigned long long)btrfs_ref_objectid(l, ref),
- (unsigned long long)btrfs_ref_offset(l, ref));
+ (unsigned long long)btrfs_ref_offset(l, ref),
+ (unsigned long)btrfs_ref_num_refs(l, ref));
break;
case BTRFS_CSUM_ITEM_KEY:
ci = btrfs_item_ptr(l, i, struct btrfs_csum_item);