io_u: ensure that we align new start offset properly for time_based
authorJens Axboe <axboe@fb.com>
Thu, 14 Jan 2016 17:31:38 +0000 (10:31 -0700)
committerJens Axboe <axboe@fb.com>
Thu, 14 Jan 2016 17:31:38 +0000 (10:31 -0700)
commit19ddc35b9b97be5af371bb65e93a4864d1dce7b6
treeb42bf435310ae479a1fcd2c90ec04e17ab7edd64
parent65f41ccb386850671c0651f976cd33fdfbe0644d
io_u: ensure that we align new start offset properly for time_based

If io_size isn't a multiple of the block size, weird things can
happen, which usually means that fio will exit with an unaligned
IO error:

fio: io_u error on file /dev/nvme0n1: Invalid argument: write offset=125830, buflen=1048576

where offset=125830 really should have been aligned to the block
size. Ensure that we do that.

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