fio: support io_size=N% (N <= 100)
authorAlexey Dobriyan <adobriyan@gmail.com>
Thu, 3 Sep 2020 16:54:02 +0000 (19:54 +0300)
committerJens Axboe <axboe@kernel.dk>
Sat, 5 Sep 2020 15:37:59 +0000 (09:37 -0600)
commit8b38f40138047975ea7a59b9ce06681ffdd2c31d
tree61290223b52cbf87359a8b6b90de12fc7fbd4840
parent2dd96cc46fa83a73acc1c9238c3ac59203e10213
fio: support io_size=N% (N <= 100)

Parse "io_size=N%".

Semantics is "multiply whatever size= calculations result in".

Example #1:

size=50%
io_size=50%

will do 25% of a file.

Example #2:

size=1G
io_size=50%

will do 512M I/O.

As side effect, fix a bug with essentially infinite loop if both size=N%
and io_size=M% are given: io_size is set to 2^64-... in this case (a lot!).

Note: only values under 100% work currently.
Going for io_size=150% requires resetting workload generator state
which is whole separate endeavour.

Signed-off-by: Alexey Dobriyan (SK hynix) <adobriyan@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
cconv.c
filesetup.c
options.c
server.h
thread_options.h