Reset file descriptor offset value to the initial value when file is
closed and io state is cleared. This fixes the bug where previous offset
values persist between loop iterations.
Signed-off-by: Jens Axboe <axboe@fb.com>
reset_io_counters(td);
close_files(td);
reset_io_counters(td);
close_files(td);
- for_each_file(td, f, i)
+ for_each_file(td, f, i) {
+ f->file_offset = get_start_offset(td, f);
+ }
/*
* Set the same seed to get repeatable runs
/*
* Set the same seed to get repeatable runs