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>
if (td->o.rate[ddir])
td->rate_bps[ddir] = td->o.rate[ddir];
else
if (td->o.rate[ddir])
td->rate_bps[ddir] = td->o.rate[ddir];
else
- td->rate_bps[ddir] = td->o.rate_iops[ddir] * bs;
+ td->rate_bps[ddir] = (uint64_t) td->o.rate_iops[ddir] * bs;
if (!td->rate_bps[ddir]) {
log_err("rate lower than supported\n");
if (!td->rate_bps[ddir]) {
log_err("rate lower than supported\n");