From: Jens Axboe Date: Sat, 1 Mar 2008 14:34:44 +0000 (+0100) Subject: Only initialize random map if we are actually going to use it X-Git-Tag: fio-1.20-rc1~28 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=de8dd119d7d869dd9c90c6d62bf4bededd10642e Only initialize random map if we are actually going to use it We alloc the randommap even for sequential workloads right now, if the 'norandommap' option isn't given. Fix that, check for td_random() before continuing. Signed-off-by: Jens Axboe --- diff --git a/filesetup.c b/filesetup.c index d10840a2..b29db3f3 100644 --- a/filesetup.c +++ b/filesetup.c @@ -497,7 +497,7 @@ int init_random_map(struct thread_data *td) struct fio_file *f; unsigned int i; - if (td->o.norandommap) + if (td->o.norandommap || !td_random(td)) return 0; for_each_file(td, f, i) {