diff options
Diffstat (limited to 'fs/btrfs/debug-tree.c')
-rw-r--r-- | fs/btrfs/debug-tree.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/fs/btrfs/debug-tree.c b/fs/btrfs/debug-tree.c deleted file mode 100644 index fd07969600c6..000000000000 --- a/fs/btrfs/debug-tree.c +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <stdlib.h> | ||
3 | #include "kerncompat.h" | ||
4 | #include "radix-tree.h" | ||
5 | #include "ctree.h" | ||
6 | #include "disk-io.h" | ||
7 | #include "print-tree.h" | ||
8 | #include "transaction.h" | ||
9 | |||
10 | int main(int ac, char **av) { | ||
11 | struct btrfs_super_block super; | ||
12 | struct btrfs_root *root; | ||
13 | |||
14 | if (ac != 2) { | ||
15 | fprintf(stderr, "usage: %s device\n", av[0]); | ||
16 | exit(1); | ||
17 | } | ||
18 | radix_tree_init(); | ||
19 | root = open_ctree(av[1], &super); | ||
20 | if (!root) { | ||
21 | fprintf(stderr, "unable to open %s\n", av[1]); | ||
22 | exit(1); | ||
23 | } | ||
24 | printf("fs tree\n"); | ||
25 | btrfs_print_tree(root, root->node); | ||
26 | printf("map tree\n"); | ||
27 | btrfs_print_tree(root->fs_info->extent_root, | ||
28 | root->fs_info->extent_root->node); | ||
29 | printf("inode tree\n"); | ||
30 | btrfs_print_tree(root->fs_info->inode_root, | ||
31 | root->fs_info->inode_root->node); | ||
32 | printf("root tree\n"); | ||
33 | btrfs_print_tree(root->fs_info->tree_root, | ||
34 | root->fs_info->tree_root->node); | ||
35 | printf("total blocks %Lu\n", btrfs_super_total_blocks(&super)); | ||
36 | printf("blocks used %Lu\n", btrfs_super_blocks_used(&super)); | ||
37 | return 0; | ||
38 | } | ||