commit | 0aacc50c2fa41e44512ce8eacfd3d679cb016d86 | [log] [tgz] |
---|---|---|
author | Bruce Cran <BCran@fusionio.com> | Sat Jul 09 08:19:53 2011 +0200 |
committer | Jens Axboe <jaxboe@fusionio.com> | Sat Jul 09 08:19:53 2011 +0200 |
tree | fd98d516a754cd67c7f846684b05b977c7238901 | |
parent | 76cd9378b90dddf2cedc9a5d49f317aaad485b90 [diff] |
Fix integer overflow in calculating large IOPS on 32-bit platforms Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
diff --git a/stat.c b/stat.c index d95be75..9f22c6e 100644 --- a/stat.c +++ b/stat.c
@@ -169,7 +169,7 @@ 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",