X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=cmds-inspect-tree-stats.c;h=eced0db9f8402ff5e8cd32dad0533742e1d566d9;hb=c449c391f5ec88e903f7a6b82bb3fc55f261c35b;hp=ecb33ce23f2328974b24c1abac83b5d2f977966d;hpb=b2615be24acc70cf4cfb377366387588e85170a3;p=platform%2Fupstream%2Fbtrfs-progs.git diff --git a/cmds-inspect-tree-stats.c b/cmds-inspect-tree-stats.c index ecb33ce..eced0db 100644 --- a/cmds-inspect-tree-stats.c +++ b/cmds-inspect-tree-stats.c @@ -35,7 +35,6 @@ #include "volumes.h" #include "utils.h" #include "commands.h" -#include "cmds-inspect-tree-stats.h" #include "help.h" static int verbose = 0; @@ -153,8 +152,7 @@ static int walk_nodes(struct btrfs_root *root, struct btrfs_path *path, path->slots[level] = i; if ((level - 1) > 0 || find_inline) { - tmp = read_tree_block(root, cur_blocknr, - nodesize, + tmp = read_tree_block(root->fs_info, cur_blocknr, btrfs_node_ptr_generation(b, i)); if (!extent_buffer_uptodate(tmp)) { error("failed to read blocknr %llu", @@ -338,7 +336,7 @@ static int calc_root_size(struct btrfs_root *tree_root, struct btrfs_key *key, stat.max_cluster_size = root->fs_info->nodesize; path.nodes[level] = root->node; if (gettimeofday(&start, NULL)) { - error("cannot get time: %s", strerror(errno)); + error("cannot get time: %m"); goto out; } if (!level) { @@ -352,7 +350,7 @@ static int calc_root_size(struct btrfs_root *tree_root, struct btrfs_key *key, if (ret) goto out; if (gettimeofday(&end, NULL)) { - error("cannot get time: %s", strerror(errno)); + error("cannot get time: %m"); goto out; } timeval_subtract(&diff, &end, &start);