summaryrefslogtreecommitdiff
path: root/print-tree.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-04-26 16:46:06 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-04-26 16:46:06 -0400
commit5856b7e1241b07a5d461ff1592562c8520c42d93 (patch)
tree2dfd928a18b73491a7a1aa698cbca84994511ec6 /print-tree.c
parentc2d777735cb24b283d7dc19ba124652f0d965318 (diff)
start of block group code
Diffstat (limited to 'print-tree.c')
-rw-r--r--print-tree.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/print-tree.c b/print-tree.c
index b7018eae..0b4d8059 100644
--- a/print-tree.c
+++ b/print-tree.c
@@ -37,7 +37,7 @@ void btrfs_print_leaf(struct btrfs_root *root, struct btrfs_leaf *l)
struct btrfs_inode_item *ii;
struct btrfs_file_extent_item *fi;
struct btrfs_csum_item *ci;
- char *p;
+ struct btrfs_block_group_item *bi;
u32 type;
printf("leaf %Lu ptrs %d free space %d generation %Lu owner %Lu\n",
@@ -64,10 +64,6 @@ void btrfs_print_leaf(struct btrfs_root *root, struct btrfs_leaf *l)
btrfs_inode_size(ii),
btrfs_inode_mode(ii));
break;
- case BTRFS_INLINE_DATA_KEY:
- p = btrfs_item_ptr(l, i, char);
- printf("\t\tinline data %.*s\n", 10, p);
- break;
case BTRFS_DIR_ITEM_KEY:
di = btrfs_item_ptr(l, i, struct btrfs_dir_item);
print_dir_item(l->items + i, di);
@@ -110,6 +106,12 @@ void btrfs_print_leaf(struct btrfs_root *root, struct btrfs_leaf *l)
btrfs_file_extent_offset(fi),
btrfs_file_extent_num_blocks(fi));
break;
+ case BTRFS_BLOCK_GROUP_ITEM_KEY:
+ bi = btrfs_item_ptr(l, i,
+ struct btrfs_block_group_item);
+ printf("\t\tblock group used %Lu\n",
+ btrfs_block_group_used(bi));
+ break;
case BTRFS_DEV_ITEM_KEY:
devi = btrfs_item_ptr(l, i, struct btrfs_device_item);
printf("\t\tdev id %Lu namelen %u name %.*s\n",