diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-03-20 20:35:03 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-03-20 20:35:03 -0400 |
commit | 1261ec42b3d3a3ad878bd172144940e3ac710749 (patch) | |
tree | 4b317d8fa13e56a5dd02f37605b9fed5952d723a /fs/btrfs/debug-tree.c | |
parent | 293ffd5fd340428276fbbd24ce7b98bf6728466b (diff) |
Btrfs: Better block record keeping, real mkfs
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/debug-tree.c')
-rw-r--r-- | fs/btrfs/debug-tree.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/btrfs/debug-tree.c b/fs/btrfs/debug-tree.c index d9f36efc3dd..fd07969600c 100644 --- a/fs/btrfs/debug-tree.c +++ b/fs/btrfs/debug-tree.c @@ -10,8 +10,17 @@ int main(int ac, char **av) { struct btrfs_super_block super; struct btrfs_root *root; + + if (ac != 2) { + fprintf(stderr, "usage: %s device\n", av[0]); + exit(1); + } radix_tree_init(); - root = open_ctree("dbfile", &super); + root = open_ctree(av[1], &super); + if (!root) { + fprintf(stderr, "unable to open %s\n", av[1]); + exit(1); + } printf("fs tree\n"); btrfs_print_tree(root, root->node); printf("map tree\n"); @@ -23,5 +32,7 @@ int main(int ac, char **av) { printf("root tree\n"); btrfs_print_tree(root->fs_info->tree_root, root->fs_info->tree_root->node); + printf("total blocks %Lu\n", btrfs_super_total_blocks(&super)); + printf("blocks used %Lu\n", btrfs_super_blocks_used(&super)); return 0; } |