aboutsummaryrefslogtreecommitdiffstats
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.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c
index 57c403b205a5..3251a0dd03a2 100644
--- a/fs/btrfs/print-tree.c
+++ b/fs/btrfs/print-tree.c
@@ -163,6 +163,7 @@ static void print_uuid_item(struct extent_buffer *l, unsigned long offset,
163 163
164void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l) 164void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l)
165{ 165{
166 struct btrfs_fs_info *fs_info = root->fs_info;
166 int i; 167 int i;
167 u32 type, nr; 168 u32 type, nr;
168 struct btrfs_item *item; 169 struct btrfs_item *item;
@@ -182,7 +183,7 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l)
182 183
183 nr = btrfs_header_nritems(l); 184 nr = btrfs_header_nritems(l);
184 185
185 btrfs_info(root->fs_info, "leaf %llu total ptrs %d free space %d", 186 btrfs_info(fs_info, "leaf %llu total ptrs %d free space %d",
186 btrfs_header_bytenr(l), nr, btrfs_leaf_free_space(root, l)); 187 btrfs_header_bytenr(l), nr, btrfs_leaf_free_space(root, l));
187 for (i = 0 ; i < nr ; i++) { 188 for (i = 0 ; i < nr ; i++) {
188 item = btrfs_item_nr(i); 189 item = btrfs_item_nr(i);
@@ -316,6 +317,7 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l)
316 317
317void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *c) 318void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *c)
318{ 319{
320 struct btrfs_fs_info *fs_info = root->fs_info;
319 int i; u32 nr; 321 int i; u32 nr;
320 struct btrfs_key key; 322 struct btrfs_key key;
321 int level; 323 int level;
@@ -328,10 +330,10 @@ void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *c)
328 btrfs_print_leaf(root, c); 330 btrfs_print_leaf(root, c);
329 return; 331 return;
330 } 332 }
331 btrfs_info(root->fs_info, 333 btrfs_info(fs_info,
332 "node %llu level %d total ptrs %d free spc %u", 334 "node %llu level %d total ptrs %d free spc %u",
333 btrfs_header_bytenr(c), level, nr, 335 btrfs_header_bytenr(c), level, nr,
334 (u32)BTRFS_NODEPTRS_PER_BLOCK(root->fs_info) - nr); 336 (u32)BTRFS_NODEPTRS_PER_BLOCK(fs_info) - nr);
335 for (i = 0; i < nr; i++) { 337 for (i = 0; i < nr; i++) {
336 btrfs_node_key_to_cpu(c, &key, i); 338 btrfs_node_key_to_cpu(c, &key, i);
337 pr_info("\tkey %d (%llu %u %llu) block %llu\n", 339 pr_info("\tkey %d (%llu %u %llu) block %llu\n",