Btrfs-progs: fix the min ticks check in print_seek_histogram
authorJosef Bacik <jbacik@fusionio.com>
Fri, 20 Sep 2013 17:51:31 +0000 (13:51 -0400)
committerChris Mason <chris.mason@fusionio.com>
Wed, 16 Oct 2013 12:23:11 +0000 (08:23 -0400)
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>
btrfs-calc-size.c

index 7ae728e..e9ef37f 100644 (file)
@@ -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))