fio: Fix for new file creation
fio fails to create new file and just comes out without doing anything..
This happens only when you are creating file freshly.
./fio ../jobfile/jobfile.test
job1: (g=0): rw=randrw, bs=8K-8K/8K-8K, ioengine=sync, iodepth=1
Starting 1 process
Run status group 0 (all jobs):
Disk stats (read/write):
sda: ios=0/0, merge=0/0, ticks=0/0, in_queue=0, util=0.00%
jobfile:
[global]
bs=8k
iodepth_batch=1
randrepeat=1
size=100m
[job1]
ioengine=sync
rw=randrw
filename=newfile
Manually bisected it to commit 509eab12448823a8eefbe925804b5308ee63bf5e
Here is the patch which fixed the issue for me. Please review and apply.
In case of new file "f->io_size > f->real_file_size" becomes true, since
f->real_file_size is 0.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
1 file changed