From de8dd119d7d869dd9c90c6d62bf4bededd10642e Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sat, 1 Mar 2008 15:34:44 +0100 Subject: [PATCH] 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 --- filesetup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.25.1