summaryrefslogtreecommitdiff
path: root/print-tree.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-03-26 16:01:00 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-03-26 16:01:00 -0400
commit4200896a53cfa14bcc4f8dcbd105343a7b1dda96 (patch)
tree8a86a7c5eaf55d6c5c72c8975300f769b82de8ba /print-tree.c
parent132db51b1f205ff2a85c9e44d44daab296b90e30 (diff)
add file extents to print_leaf
Diffstat (limited to 'print-tree.c')
-rw-r--r--print-tree.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/print-tree.c b/print-tree.c
index 5259b6e9..5fa8d8a5 100644
--- a/print-tree.c
+++ b/print-tree.c
@@ -15,6 +15,7 @@ void btrfs_print_leaf(struct btrfs_root *root, struct btrfs_leaf *l)
struct btrfs_dir_item *di;
struct btrfs_inode_map_item *mi;
struct btrfs_inode_item *ii;
+ struct btrfs_file_extent_item *fi;
u32 type;
printf("leaf %Lu ptrs %d free space %d parent %Lu generation %Lu\n",
@@ -67,6 +68,16 @@ void btrfs_print_leaf(struct btrfs_root *root, struct btrfs_leaf *l)
btrfs_disk_key_flags(&mi->key),
btrfs_disk_key_offset(&mi->key));
break;
+ case BTRFS_EXTENT_DATA_KEY:
+ fi = btrfs_item_ptr(l, i,
+ struct btrfs_file_extent_item);
+ printf("\t\textent data disk block %Lu nr %Lu\n",
+ btrfs_file_extent_disk_blocknr(fi),
+ btrfs_file_extent_disk_num_blocks(fi));
+ printf("\t\textent data offset %Lu nr %Lu\n",
+ btrfs_file_extent_offset(fi),
+ btrfs_file_extent_num_blocks(fi));
+ break;
case BTRFS_STRING_ITEM_KEY:
printf("\t\titem data %.*s\n", btrfs_item_size(item),
btrfs_leaf_data(l) + btrfs_item_offset(item));