btrfs-progs/debug-tree.c

28 lines
717 B
C
Raw Normal View History

#include <stdio.h>
#include <stdlib.h>
#include "kerncompat.h"
#include "radix-tree.h"
#include "ctree.h"
#include "disk-io.h"
#include "print-tree.h"
2007-03-16 20:20:31 +00:00
#include "transaction.h"
2007-02-28 14:40:58 +00:00
int main(int ac, char **av) {
2007-03-13 14:46:10 +00:00
struct btrfs_super_block super;
struct btrfs_root *root;
radix_tree_init();
root = open_ctree("dbfile", &super);
printf("fs tree\n");
2007-03-13 14:46:10 +00:00
btrfs_print_tree(root, root->node);
printf("map tree\n");
btrfs_print_tree(root->fs_info->extent_root,
root->fs_info->extent_root->node);
printf("inode tree\n");
btrfs_print_tree(root->fs_info->inode_root,
root->fs_info->inode_root->node);
printf("root tree\n");
btrfs_print_tree(root->fs_info->tree_root,
root->fs_info->tree_root->node);
return 0;
}