Ensure that lfsr_init() is always called
authorJens Axboe <axboe@kernel.dk>
Mon, 26 Nov 2012 18:59:14 +0000 (19:59 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 26 Nov 2012 18:59:14 +0000 (19:59 +0100)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
filesetup.c

index e7f5f1f39847f3865caa3599dea6c98b02a74ffd..b70bd45439e2fc59787230fcc0b263dc97bba48a 100644 (file)
@@ -911,7 +911,7 @@ int init_random_map(struct thread_data *td)
 
        if (init_rand_distribution(td))
                return 0;
-       if (td->o.norandommap || !td_random(td))
+       if (!td_random(td))
                return 0;
 
        for_each_file(td, f, i) {
@@ -920,7 +920,7 @@ int init_random_map(struct thread_data *td)
                if (td->o.random_generator == FIO_RAND_GEN_LFSR) {
                        if (!lfsr_init(&f->lfsr, blocks))
                                continue;
-               } else {
+               } else if (!td->o.norandommap) {
                        f->io_bitmap = bitmap_new(blocks);
                        if (f->io_bitmap)
                                continue;