debug-tree.c 459 字节
Newer Older
1 2 3 4 5 6 7 8
#include <stdio.h>
#include <stdlib.h>
#include "kerncompat.h"
#include "radix-tree.h"
#include "ctree.h"
#include "disk-io.h"
#include "print-tree.h"

9
int main(int ac, char **av) {
C
Chris Mason 已提交
10 11
	struct btrfs_super_block super;
	struct btrfs_root *root;
12 13 14
	radix_tree_init();
	root = open_ctree("dbfile", &super);
	printf("root tree\n");
C
Chris Mason 已提交
15
	btrfs_print_tree(root, root->node);
16
	printf("map tree\n");
C
Chris Mason 已提交
17
	btrfs_print_tree(root->extent_root, root->extent_root->node);
18 19
	return 0;
}