aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/debug-tree.c
blob: 91dea7a0a476f98aeb7a1816401d4f6319d4a546 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdio.h>
#include <stdlib.h>
#include "kerncompat.h"
#include "radix-tree.h"
#include "ctree.h"
#include "disk-io.h"
#include "print-tree.h"
#include "transaction.h"

int main(int ac, char **av) {
	struct btrfs_super_block super;
	struct btrfs_root *root;
	radix_tree_init();
	root = open_ctree("dbfile", &super);
	printf("fs tree\n");
	btrfs_print_tree(root, root->node);
	printf("map tree\n");
	btrfs_print_tree(root->extent_root, root->extent_root->node);
	printf("root tree\n");
	btrfs_print_tree(root->tree_root, root->tree_root->node);
	return 0;
}