summaryrefslogtreecommitdiff
path: root/io_u.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-05-31 09:05:59 -0600
committerJens Axboe <axboe@kernel.dk>2018-05-31 09:05:59 -0600
commit80f021501fda6a6244672bb89dd8221a61cee54b (patch)
tree7027bbf65237fcf58dba5ede7bab71be52ea552a /io_u.c
parentcf04b906fda16c6c14c420b71130a31d6580e9d8 (diff)
downloadfio-80f021501fda6a6244672bb89dd8221a61cee54b.tar.gz
fio-80f021501fda6a6244672bb89dd8221a61cee54b.tar.bz2
io_u: ensure to invalidate cache on time_based random reads
We need to do this with the file reset and retrieval of a new offset, not of it fails. Fixes: 0bcf41cdc22df ("io_u: re-invalidate cache when looping around without file open/close") Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_u.c')
-rw-r--r--io_u.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_u.c b/io_u.c
index 5b4c0df0..945aa192 100644
--- a/io_u.c
+++ b/io_u.c
@@ -325,9 +325,9 @@ static int get_next_rand_block(struct thread_data *td, struct fio_file *f,
if (td->o.time_based ||
(td->o.file_service_type & __FIO_FSERVICE_NONUNIFORM)) {
fio_file_reset(td, f);
+ loop_cache_invalidate(td, f);
if (!get_next_rand_offset(td, f, ddir, b))
return 0;
- loop_cache_invalidate(td, f);
}
dprint(FD_IO, "%s: rand offset failed, last=%llu, size=%llu\n",