aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/debug-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/debug-tree.c')
-rw-r--r--fs/btrfs/debug-tree.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/fs/btrfs/debug-tree.c b/fs/btrfs/debug-tree.c
new file mode 100644
index 000000000000..b2c5abfdc74a
--- /dev/null
+++ b/fs/btrfs/debug-tree.c
@@ -0,0 +1,19 @@
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
9int main() {
10 struct ctree_super_block super;
11 struct ctree_root *root;
12 radix_tree_init();
13 root = open_ctree("dbfile", &super);
14 printf("root tree\n");
15 print_tree(root, root->node);
16 printf("map tree\n");
17 print_tree(root->extent_root, root->extent_root->node);
18 return 0;
19}