From: Jens Axboe Date: Tue, 7 Apr 2009 11:06:43 +0000 (+0200) Subject: File reset should clear random map as well X-Git-Tag: fio-1.25~2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=eaf9b417e77b835886c3bb89ca0630dcec6d469f;p=fio.git 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 --- 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)