linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Btrfs-progs: fix the min ticks check in print_seek_histogram
@ 2013-09-20 17:51 Josef Bacik
  0 siblings, 0 replies; only message in thread
From: Josef Bacik @ 2013-09-20 17:51 UTC (permalink / raw)
  To: linux-btrfs

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>
---
 btrfs-calc-size.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/btrfs-calc-size.c b/btrfs-calc-size.c
index ab942c6..b2c888c 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))
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kerne

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-09-20 17:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-20 17:51 [PATCH] Btrfs-progs: fix the min ticks check in print_seek_histogram Josef Bacik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).