summaryrefslogtreecommitdiff
path: root/debug-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 /debug-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 'debug-tree.c')
-rw-r--r--debug-tree.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/debug-tree.c b/debug-tree.c
index e5de3032..de295df3 100644
--- a/debug-tree.c
+++ b/debug-tree.c
@@ -58,13 +58,14 @@ static void print_extent_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("%llu %llu extent back ref root %llu gen %llu "
- "owner %llu offset %llu\n",
+ "owner %llu offset %llu num_refs %lu\n",
(unsigned long long)last,
(unsigned long long)last_len,
(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;
};
fflush(stdout);