summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/print-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/print-tree.c')
-rw-r--r--fs/btrfs/print-tree.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c
index 7df16b1e4733..33f5ee4052c1 100644
--- a/fs/btrfs/print-tree.c
+++ b/fs/btrfs/print-tree.c
@@ -9,7 +9,7 @@ void print_leaf(struct leaf *l)
{
int i;
u32 nr = btrfs_header_nritems(&l->header);
- struct item *item;
+ struct btrfs_item *item;
struct extent_item *ei;
printf("leaf %Lu total ptrs %d free space %d\n",
btrfs_header_blocknr(&l->header), nr, leaf_free_space(l));
@@ -18,12 +18,15 @@ void print_leaf(struct leaf *l)
item = l->items + i;
printf("\titem %d key (%Lu %u %Lu) itemoff %d itemsize %d\n",
i,
- item->key.objectid, item->key.flags, item->key.offset,
- item->offset, item->size);
+ btrfs_key_objectid(&item->key),
+ btrfs_key_flags(&item->key),
+ btrfs_key_offset(&item->key),
+ btrfs_item_offset(item),
+ btrfs_item_size(item));
fflush(stdout);
- printf("\t\titem data %.*s\n", item->size,
- l->data+item->offset);
- ei = (struct extent_item *)(l->data + item->offset);
+ printf("\t\titem data %.*s\n", btrfs_item_size(item),
+ l->data + btrfs_item_offset(item));
+ ei = (struct extent_item *)(l->data + btrfs_item_offset(item));
printf("\t\textent data refs %u owner %Lu\n", ei->refs,
ei->owner);
fflush(stdout);
OpenPOWER on IntegriCloud