io_size vs. time_based discrepancy
authorAndrey Kuzmin <andrey.v.kuzmin@gmail.com>
Mon, 30 Nov 2015 10:52:05 +0000 (13:52 +0300)
committerJens Axboe <axboe@fb.com>
Mon, 30 Nov 2015 17:20:58 +0000 (10:20 -0700)
commitc82ea3d49aaa5b22188d35819dd623810ae11228
tree603d2876012c0e6924fdae3858d07cacc8c1f58a
parent6a6b11f436c822cac154da5a60c4cc6baa6a8008
io_size vs. time_based discrepancy

I'm witnessing an annoying discrepancy between the outcome of the same
job when being run as io_size-based vs. time_based. In the former
mode, the job does exactly what I want it to do, writing the
prescribed amount of data randomly w/o being concerned whether that
total bytes written is in any way related to the target file size.

On the contrary, in the latter mode that same job, after writing the
file's size worth of bytes, resets random generator and essentially
restarts the just completed loop. The offending code is below, and the
suggested fix brings back home the io_size-like behavior when running
time-based. Nonetheless, I'm in doubt regarding whether the do_io loop
break-out below was intended to support the designed behavior (looks
unlikely to me, as looping like that is produced by the 'loops'
option, although time_based definition under HOWTO is rather unclear
in this regard) or is a bug worth fixing.

Regards,
Andrey

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