From: Bruce Cran Date: Sat, 9 Jul 2011 06:19:53 +0000 (+0200) Subject: Fix integer overflow in calculating large IOPS on 32-bit platforms X-Git-Tag: fio-1.56~19 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=0aacc50c2fa41e44512ce8eacfd3d679cb016d86 Fix integer overflow in calculating large IOPS on 32-bit platforms Signed-off-by: Jens Axboe --- diff --git a/stat.c b/stat.c index d95be758..9f22c6e1 100644 --- a/stat.c +++ b/stat.c @@ -169,7 +169,7 @@ static void show_ddir_status(struct group_run_stats *rs, struct thread_stat *ts, io_p = num2str(ts->io_bytes[ddir], 6, 1, i2p); bw_p = num2str(bw, 6, 1, i2p); - iops = (1000 * ts->total_io_u[ddir]) / runt; + iops = (1000 * (uint64_t)ts->total_io_u[ddir]) / runt; iops_p = num2str(iops, 6, 1, 0); log_info(" %s: io=%sB, bw=%sB/s, iops=%s, runt=%6llumsec\n",