file extent fix
authorGurudas Pai <gurudas.pai@oracle.com>
Thu, 24 Jan 2008 12:04:44 +0000 (13:04 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 24 Jan 2008 12:04:44 +0000 (13:04 +0100)
commit587af925762ff4bdf6a54965a35b2da2637f2f6e
tree26f58759408fdf910b3f19e6ec643e0f828b3ecd
parent89e820f6833fd6ea36625aa9393f1559f2d881dd
file extent fix

I ran a test with latest fio using jobfile,

[global]
size=10m
[job1]
ioengine=sync
rw=write
filename=testfile

And second time,
[global]
size=30m --> size increased.
[job1]
ioengine=sync
rw=write
filename=testfile

fio did not extend the file to 30m.

In case of f->file_offset=0, f->io_size equals to f->real_file_size, hence no extend.
Following patch worked for me. But this patch will not handle the case where we have
to extend a file and with offset :(

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
filesetup.c