summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-04-07 13:06:43 +0200
committerJens Axboe <jens.axboe@oracle.com>2009-04-07 13:06:43 +0200
commiteaf9b417e77b835886c3bb89ca0630dcec6d469f (patch)
treec87d4c1325e3356a9921bc5ab53fcbe90c0e897b
parentcea0b7c046290bbcc57ef7dcee18f90d08e9d72a (diff)
downloadfio-eaf9b417e77b835886c3bb89ca0630dcec6d469f.tar.gz
fio-eaf9b417e77b835886c3bb89ca0630dcec6d469f.tar.bz2
File reset should clear random map as well
Fixes infinite loop on time based runs, where it repeatedly fails getting a new offset. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r--fio.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fio.h b/fio.h
index a9e2e3bb..4077a5be 100644
--- a/fio.h
+++ b/fio.h
@@ -1033,6 +1033,8 @@ static inline void fio_file_reset(struct fio_file *f)
{
f->last_free_lookup = 0;
f->last_pos = f->file_offset;
+ if (f->file_map)
+ memset(f->file_map, 0, f->num_maps * sizeof(int));
}
static inline void clear_error(struct thread_data *td)