diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-03-20 14:38:32 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-03-20 14:38:32 -0400 |
commit | 9f5fae2fe6dc35b46bf56183f11398451851cb3f (patch) | |
tree | e72b03149662b8e5d4fe491c36f3cf66c5df5437 /fs/btrfs/print-tree.c | |
parent | 631d7d950a2f2706f5c86858402c1ec50b9801f1 (diff) |
Btrfs: Add inode map, and the start of file extent items
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/print-tree.c')
-rw-r--r-- | fs/btrfs/print-tree.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c index 0bb5c38427c9..f250e5fad773 100644 --- a/fs/btrfs/print-tree.c +++ b/fs/btrfs/print-tree.c | |||
@@ -13,8 +13,8 @@ void btrfs_print_leaf(struct btrfs_root *root, struct btrfs_leaf *l) | |||
13 | struct btrfs_extent_item *ei; | 13 | struct btrfs_extent_item *ei; |
14 | struct btrfs_root_item *ri; | 14 | struct btrfs_root_item *ri; |
15 | struct btrfs_dir_item *di; | 15 | struct btrfs_dir_item *di; |
16 | struct btrfs_inode_map_item *mi; | ||
16 | u32 type; | 17 | u32 type; |
17 | u32 namelen; | ||
18 | 18 | ||
19 | printf("leaf %Lu total ptrs %d free space %d\n", | 19 | printf("leaf %Lu total ptrs %d free space %d\n", |
20 | btrfs_header_blocknr(&l->header), nr, | 20 | btrfs_header_blocknr(&l->header), nr, |
@@ -34,15 +34,13 @@ void btrfs_print_leaf(struct btrfs_root *root, struct btrfs_leaf *l) | |||
34 | case BTRFS_INODE_ITEM_KEY: | 34 | case BTRFS_INODE_ITEM_KEY: |
35 | break; | 35 | break; |
36 | case BTRFS_DIR_ITEM_KEY: | 36 | case BTRFS_DIR_ITEM_KEY: |
37 | namelen = btrfs_item_size(l->items + i) - sizeof(*di); | ||
38 | di = btrfs_item_ptr(l, i, struct btrfs_dir_item); | 37 | di = btrfs_item_ptr(l, i, struct btrfs_dir_item); |
39 | printf("\t\tdir oid %Lu flags %u type %u\n", | 38 | printf("\t\tdir oid %Lu flags %u type %u\n", |
40 | btrfs_dir_objectid(di), | 39 | btrfs_dir_objectid(di), |
41 | btrfs_dir_flags(di), | 40 | btrfs_dir_flags(di), |
42 | btrfs_dir_type(di)); | 41 | btrfs_dir_type(di)); |
43 | printf("\t\tname %.*s\n", | 42 | printf("\t\tname %.*s\n", |
44 | namelen, (char *)(di + 1)); | 43 | btrfs_dir_name_len(di),(char *)(di + 1)); |
45 | |||
46 | break; | 44 | break; |
47 | case BTRFS_ROOT_ITEM_KEY: | 45 | case BTRFS_ROOT_ITEM_KEY: |
48 | ri = btrfs_item_ptr(l, i, struct btrfs_root_item); | 46 | ri = btrfs_item_ptr(l, i, struct btrfs_root_item); |
@@ -54,6 +52,13 @@ void btrfs_print_leaf(struct btrfs_root *root, struct btrfs_leaf *l) | |||
54 | printf("\t\textent data refs %u owner %Lu\n", | 52 | printf("\t\textent data refs %u owner %Lu\n", |
55 | btrfs_extent_refs(ei), btrfs_extent_owner(ei)); | 53 | btrfs_extent_refs(ei), btrfs_extent_owner(ei)); |
56 | break; | 54 | break; |
55 | case BTRFS_INODE_MAP_ITEM_KEY: | ||
56 | mi = btrfs_item_ptr(l, i, struct btrfs_inode_map_item); | ||
57 | printf("\t\tinode map key %Lu %u %Lu\n", | ||
58 | btrfs_disk_key_objectid(&mi->key), | ||
59 | btrfs_disk_key_flags(&mi->key), | ||
60 | btrfs_disk_key_offset(&mi->key)); | ||
61 | break; | ||
57 | case BTRFS_STRING_ITEM_KEY: | 62 | case BTRFS_STRING_ITEM_KEY: |
58 | printf("\t\titem data %.*s\n", btrfs_item_size(item), | 63 | printf("\t\titem data %.*s\n", btrfs_item_size(item), |
59 | btrfs_leaf_data(l) + btrfs_item_offset(item)); | 64 | btrfs_leaf_data(l) + btrfs_item_offset(item)); |