summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2013-09-20 13:51:31 -0400
committerChris Mason <chris.mason@fusionio.com>2013-10-16 08:23:11 -0400
commit1b10eaa8e1d453d65f571db47cd2207041835451 (patch)
tree888ebc82e7ee77633a256e7622400048cb8aa7bf
parent25d82d222944a234a006d8828fa20329a370c807 (diff)
Btrfs-progs: fix the min ticks check in print_seek_histogram
Before I had been dividing by 5 but that gave me too much output so I changed it to 20 without changing the min seeks test. Fix this to avoid a divide by 0 problem. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
-rw-r--r--btrfs-calc-size.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/btrfs-calc-size.c b/btrfs-calc-size.c
index 7ae728e2..e9ef37f7 100644
--- a/btrfs-calc-size.c
+++ b/btrfs-calc-size.c
@@ -228,7 +228,7 @@ static void print_seek_histogram(struct root_stats *stat)
u64 max_seek = stat->max_seek_len;
int digits = 1;
- if (stat->total_seeks < 5)
+ if (stat->total_seeks < 20)
return;
while ((max_seek /= 10))