Fix broken 'norandommap'
authorJens Axboe <axboe@kernel.dk>
Thu, 29 Nov 2012 20:37:11 +0000 (21:37 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 29 Nov 2012 20:37:11 +0000 (21:37 +0100)
commit 8055e41d broke the option, always falling through to
the failure case.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
filesetup.c

index 4fe37ae..9fb325b 100644 (file)
@@ -924,7 +924,8 @@ int init_random_map(struct thread_data *td)
                        f->io_axmap = axmap_new(blocks);
                        if (f->io_axmap)
                                continue;
                        f->io_axmap = axmap_new(blocks);
                        if (f->io_axmap)
                                continue;
-               }
+               } else if (td->o.norandommap)
+                       continue;
 
                if (!td->o.softrandommap) {
                        log_err("fio: failed allocating random map. If running"
 
                if (!td->o.softrandommap) {
                        log_err("fio: failed allocating random map. If running"