summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/print-tree.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-12-11 09:25:06 -0500
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:03:58 -0400
commit7bb86316c3961d1bc401ef184fd996f999556c7f (patch)
treee67de3b594cf680f295010095a71ed7e825cb757 /fs/btrfs/print-tree.c
parent74493f7a59bfd4d1c7029c74ab2cd0e400612c6b (diff)
downloadop-kernel-dev-7bb86316c3961d1bc401ef184fd996f999556c7f.zip
op-kernel-dev-7bb86316c3961d1bc401ef184fd996f999556c7f.tar.gz
Btrfs: Add back pointers from extents to the btree or file referencing them
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/print-tree.c')
-rw-r--r--fs/btrfs/print-tree.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c
index 030324f..da0b4dc 100644
--- a/fs/btrfs/print-tree.c
+++ b/fs/btrfs/print-tree.c
@@ -33,6 +33,7 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l)
struct btrfs_file_extent_item *fi;
struct btrfs_key key;
struct btrfs_key found_key;
+ struct btrfs_extent_ref *ref;
u32 type;
printk("leaf %llu total ptrs %d free space %d\n",
@@ -73,6 +74,15 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l)
printk("\t\textent data refs %u\n",
btrfs_extent_refs(l, ei));
break;
+ case BTRFS_EXTENT_REF_KEY:
+ ref = btrfs_item_ptr(l, i, struct btrfs_extent_ref);
+ printk("\t\textent back ref root %llu gen %llu "
+ "owner %llu offset %llu\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));
+ break;
case BTRFS_EXTENT_DATA_KEY:
fi = btrfs_item_ptr(l, i,
OpenPOWER on IntegriCloud