aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/print-tree.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-06-12 07:50:13 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-06-12 07:50:13 -0400
commit5af3981c1878b0657b9babd2ef7ec98c2008cf2c (patch)
tree084068ff090eab1a8235c6bdd9f49563a51675a6 /fs/btrfs/print-tree.c
parent84f54cfa78c81991e087309a9b379f25f1ffdb10 (diff)
Btrfs: printk fixes
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/print-tree.c')
-rw-r--r--fs/btrfs/print-tree.c42
1 files changed, 22 insertions, 20 deletions
diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c
index 28813411de66..21791f037561 100644
--- a/fs/btrfs/print-tree.c
+++ b/fs/btrfs/print-tree.c
@@ -15,31 +15,32 @@ void btrfs_print_leaf(struct btrfs_root *root, struct btrfs_leaf *l)
15 struct btrfs_block_group_item *bi; 15 struct btrfs_block_group_item *bi;
16 u32 type; 16 u32 type;
17 17
18 printk("leaf %Lu total ptrs %d free space %d\n", 18 printk("leaf %llu total ptrs %d free space %d\n",
19 btrfs_header_blocknr(&l->header), nr, 19 (unsigned long long)btrfs_header_blocknr(&l->header), nr,
20 btrfs_leaf_free_space(root, l)); 20 btrfs_leaf_free_space(root, l));
21 for (i = 0 ; i < nr ; i++) { 21 for (i = 0 ; i < nr ; i++) {
22 item = l->items + i; 22 item = l->items + i;
23 type = btrfs_disk_key_type(&item->key); 23 type = btrfs_disk_key_type(&item->key);
24 printk("\titem %d key (%Lu %x %Lu) itemoff %d itemsize %d\n", 24 printk("\titem %d key (%llu %x %llu) itemoff %d itemsize %d\n",
25 i, 25 i,
26 btrfs_disk_key_objectid(&item->key), 26 (unsigned long long)btrfs_disk_key_objectid(&item->key),
27 btrfs_disk_key_flags(&item->key), 27 btrfs_disk_key_flags(&item->key),
28 btrfs_disk_key_offset(&item->key), 28 (unsigned long long)btrfs_disk_key_offset(&item->key),
29 btrfs_item_offset(item), 29 btrfs_item_offset(item),
30 btrfs_item_size(item)); 30 btrfs_item_size(item));
31 switch (type) { 31 switch (type) {
32 case BTRFS_INODE_ITEM_KEY: 32 case BTRFS_INODE_ITEM_KEY:
33 ii = btrfs_item_ptr(l, i, struct btrfs_inode_item); 33 ii = btrfs_item_ptr(l, i, struct btrfs_inode_item);
34 printk("\t\tinode generation %Lu size %Lu mode %o\n", 34 printk("\t\tinode generation %llu size %llu mode %o\n",
35 btrfs_inode_generation(ii), 35 (unsigned long long)btrfs_inode_generation(ii),
36 btrfs_inode_size(ii), 36 (unsigned long long)btrfs_inode_size(ii),
37 btrfs_inode_mode(ii)); 37 btrfs_inode_mode(ii));
38 break; 38 break;
39 case BTRFS_DIR_ITEM_KEY: 39 case BTRFS_DIR_ITEM_KEY:
40 di = btrfs_item_ptr(l, i, struct btrfs_dir_item); 40 di = btrfs_item_ptr(l, i, struct btrfs_dir_item);
41 printk("\t\tdir oid %Lu flags %u type %u\n", 41 printk("\t\tdir oid %llu flags %u type %u\n",
42 btrfs_disk_key_objectid(&di->location), 42 (unsigned long long)btrfs_disk_key_objectid(
43 &di->location),
43 btrfs_dir_flags(di), 44 btrfs_dir_flags(di),
44 btrfs_dir_type(di)); 45 btrfs_dir_type(di));
45 printk("\t\tname %.*s\n", 46 printk("\t\tname %.*s\n",
@@ -47,8 +48,9 @@ void btrfs_print_leaf(struct btrfs_root *root, struct btrfs_leaf *l)
47 break; 48 break;
48 case BTRFS_ROOT_ITEM_KEY: 49 case BTRFS_ROOT_ITEM_KEY:
49 ri = btrfs_item_ptr(l, i, struct btrfs_root_item); 50 ri = btrfs_item_ptr(l, i, struct btrfs_root_item);
50 printk("\t\troot data blocknr %Lu refs %u\n", 51 printk("\t\troot data blocknr %llu refs %u\n",
51 btrfs_root_blocknr(ri), btrfs_root_refs(ri)); 52 (unsigned long long)btrfs_root_blocknr(ri),
53 btrfs_root_refs(ri));
52 break; 54 break;
53 case BTRFS_EXTENT_ITEM_KEY: 55 case BTRFS_EXTENT_ITEM_KEY:
54 ei = btrfs_item_ptr(l, i, struct btrfs_extent_item); 56 ei = btrfs_item_ptr(l, i, struct btrfs_extent_item);
@@ -58,8 +60,8 @@ void btrfs_print_leaf(struct btrfs_root *root, struct btrfs_leaf *l)
58 case BTRFS_BLOCK_GROUP_ITEM_KEY: 60 case BTRFS_BLOCK_GROUP_ITEM_KEY:
59 bi = btrfs_item_ptr(l, i, 61 bi = btrfs_item_ptr(l, i,
60 struct btrfs_block_group_item); 62 struct btrfs_block_group_item);
61 printk("\t\tblock group used %Lu\n", 63 printk("\t\tblock group used %llu\n",
62 btrfs_block_group_used(bi)); 64 (unsigned long long)btrfs_block_group_used(bi));
63 break; 65 break;
64 case BTRFS_STRING_ITEM_KEY: 66 case BTRFS_STRING_ITEM_KEY:
65 printk("\t\titem data %.*s\n", btrfs_item_size(item), 67 printk("\t\titem data %.*s\n", btrfs_item_size(item),
@@ -83,17 +85,17 @@ void btrfs_print_tree(struct btrfs_root *root, struct buffer_head *t)
83 btrfs_print_leaf(root, (struct btrfs_leaf *)c); 85 btrfs_print_leaf(root, (struct btrfs_leaf *)c);
84 return; 86 return;
85 } 87 }
86 printk("node %Lu level %d total ptrs %d free spc %u\n", 88 printk("node %llu level %d total ptrs %d free spc %u\n",
87 btrfs_header_blocknr(&c->header), 89 (unsigned long long)btrfs_header_blocknr(&c->header),
88 btrfs_header_level(&c->header), nr, 90 btrfs_header_level(&c->header), nr,
89 (u32)BTRFS_NODEPTRS_PER_BLOCK(root) - nr); 91 (u32)BTRFS_NODEPTRS_PER_BLOCK(root) - nr);
90 for (i = 0; i < nr; i++) { 92 for (i = 0; i < nr; i++) {
91 printk("\tkey %d (%Lu %u %Lu) block %Lu\n", 93 printk("\tkey %d (%llu %u %llu) block %llu\n",
92 i, 94 i,
93 c->ptrs[i].key.objectid, 95 (unsigned long long)c->ptrs[i].key.objectid,
94 c->ptrs[i].key.flags, 96 c->ptrs[i].key.flags,
95 c->ptrs[i].key.offset, 97 (unsigned long long)c->ptrs[i].key.offset,
96 btrfs_node_blockptr(c, i)); 98 (unsigned long long)btrfs_node_blockptr(c, i));
97 } 99 }
98 for (i = 0; i < nr; i++) { 100 for (i = 0; i < nr; i++) {
99 struct buffer_head *next_buf = read_tree_block(root, 101 struct buffer_head *next_buf = read_tree_block(root,