Chris Mason | fec577f | 2007-02-26 10:40:21 -0500 | [diff] [blame] | 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" |
Chris Mason | e089f05 | 2007-03-16 16:20:31 -0400 | [diff] [blame] | 8 | #include "transaction.h" |
Chris Mason | fec577f | 2007-02-26 10:40:21 -0500 | [diff] [blame] | 9 | |
Chris Mason | af86d07 | 2007-02-28 09:40:58 -0500 | [diff] [blame] | 10 | int main(int ac, char **av) { |
Chris Mason | 234b63a | 2007-03-13 10:46:10 -0400 | [diff] [blame] | 11 | struct btrfs_super_block super; |
| 12 | struct btrfs_root *root; |
Chris Mason | fec577f | 2007-02-26 10:40:21 -0500 | [diff] [blame] | 13 | radix_tree_init(); |
| 14 | root = open_ctree("dbfile", &super); |
Chris Mason | 3768f36 | 2007-03-13 16:47:54 -0400 | [diff] [blame] | 15 | printf("fs tree\n"); |
Chris Mason | 234b63a | 2007-03-13 10:46:10 -0400 | [diff] [blame] | 16 | btrfs_print_tree(root, root->node); |
Chris Mason | fec577f | 2007-02-26 10:40:21 -0500 | [diff] [blame] | 17 | printf("map tree\n"); |
Chris Mason | 9f5fae2 | 2007-03-20 14:38:32 -0400 | [diff] [blame^] | 18 | btrfs_print_tree(root->fs_info->extent_root, |
| 19 | root->fs_info->extent_root->node); |
| 20 | printf("inode tree\n"); |
| 21 | btrfs_print_tree(root->fs_info->inode_root, |
| 22 | root->fs_info->inode_root->node); |
Chris Mason | 3768f36 | 2007-03-13 16:47:54 -0400 | [diff] [blame] | 23 | printf("root tree\n"); |
Chris Mason | 9f5fae2 | 2007-03-20 14:38:32 -0400 | [diff] [blame^] | 24 | btrfs_print_tree(root->fs_info->tree_root, |
| 25 | root->fs_info->tree_root->node); |
Chris Mason | fec577f | 2007-02-26 10:40:21 -0500 | [diff] [blame] | 26 | return 0; |
| 27 | } |