Fix integer overflow in rate_iops
authorJens Axboe <axboe@fb.com>
Fri, 25 Sep 2015 02:35:44 +0000 (20:35 -0600)
committerJens Axboe <axboe@fb.com>
Fri, 25 Sep 2015 02:35:44 +0000 (20:35 -0600)
commit194fffd042d374d5e13af61a14fe16734c396d8c
tree11d242fc19c435abe9cd3f9218fcafb3a98d9772
parent01cbd4d913d4eed56dc51256cddfe327b9c28d4c
Fix integer overflow in rate_iops

For the following job file:

[bla]
rw=randread
bs=1024m
rate_iops=100

We end up overflowing in multiplication, making the bps field 0.
Fio exits by reporting:

rate lower than supported

Fix this by casting to uint64_t, the type of the output.

Signed-off-by: Jens Axboe <axboe@fb.com>
init.c