summaryrefslogtreecommitdiff
path: root/cmds-inspect-tree-stats.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmds-inspect-tree-stats.c')
-rw-r--r--cmds-inspect-tree-stats.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/cmds-inspect-tree-stats.c b/cmds-inspect-tree-stats.c
index 792ccaa8..4e1a28ea 100644
--- a/cmds-inspect-tree-stats.c
+++ b/cmds-inspect-tree-stats.c
@@ -104,7 +104,7 @@ static int walk_leaf(struct btrfs_root *root, struct btrfs_path *path,
struct btrfs_key found_key;
int i;
- stat->total_bytes += root->leafsize;
+ stat->total_bytes += root->nodesize;
stat->total_leaves++;
if (!find_inline)
@@ -137,7 +137,7 @@ static int walk_nodes(struct btrfs_root *root, struct btrfs_path *path,
{
struct extent_buffer *b = path->nodes[level];
u64 last_block;
- u64 cluster_size = root->leafsize;
+ u64 cluster_size = root->nodesize;
int i;
int ret = 0;
@@ -166,9 +166,9 @@ static int walk_nodes(struct btrfs_root *root, struct btrfs_path *path,
find_inline);
else
ret = walk_leaf(root, path, stat, find_inline);
- if (last_block + root->leafsize != cur_blocknr) {
+ if (last_block + root->nodesize != cur_blocknr) {
u64 distance = calc_distance(last_block +
- root->leafsize,
+ root->nodesize,
cur_blocknr);
stat->total_seeks++;
stat->total_seek_len += distance;
@@ -184,7 +184,7 @@ static int walk_nodes(struct btrfs_root *root, struct btrfs_path *path,
stat->forward_seeks++;
else
stat->backward_seeks++;
- if (cluster_size != root->leafsize) {
+ if (cluster_size != root->nodesize) {
stat->total_cluster_size += cluster_size;
stat->total_clusters++;
if (cluster_size < stat->min_cluster_size)
@@ -192,9 +192,9 @@ static int walk_nodes(struct btrfs_root *root, struct btrfs_path *path,
if (cluster_size > stat->max_cluster_size)
stat->max_cluster_size = cluster_size;
}
- cluster_size = root->leafsize;
+ cluster_size = root->nodesize;
} else {
- cluster_size += root->leafsize;
+ cluster_size += root->nodesize;
}
last_block = cur_blocknr;
if (cur_blocknr < stat->lowest_bytenr)
@@ -337,7 +337,7 @@ static int calc_root_size(struct btrfs_root *tree_root, struct btrfs_key *key,
stat.lowest_bytenr = btrfs_header_bytenr(root->node);
stat.highest_bytenr = stat.lowest_bytenr;
stat.min_cluster_size = (u64)-1;
- stat.max_cluster_size = root->leafsize;
+ stat.max_cluster_size = root->nodesize;
path->nodes[level] = root->node;
if (gettimeofday(&start, NULL)) {
fprintf(stderr, "Error getting time: %d\n", errno);