Btrfs: Add fsx-style randomized tree tester
Add debug-tree command to print the tree
Add extent-tree.c to the repo
Comment ctree.h

Signed-off-by: Chris Mason <chris.mason@oracle.com>
diff --git a/fs/btrfs/debug-tree.c b/fs/btrfs/debug-tree.c
new file mode 100644
index 0000000..b2c5abf
--- /dev/null
+++ b/fs/btrfs/debug-tree.c
@@ -0,0 +1,19 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include "kerncompat.h"
+#include "radix-tree.h"
+#include "ctree.h"
+#include "disk-io.h"
+#include "print-tree.h"
+
+int main() {
+	struct ctree_super_block super;
+	struct ctree_root *root;
+	radix_tree_init();
+	root = open_ctree("dbfile", &super);
+	printf("root tree\n");
+	print_tree(root, root->node);
+	printf("map tree\n");
+	print_tree(root->extent_root, root->extent_root->node);
+	return 0;
+}