filesetup: use zonerange for map and LFSR with zonemode=strided
authorVincent Fu <vincent.fu@wdc.com>
Tue, 15 Oct 2019 14:29:57 +0000 (10:29 -0400)
committerJens Axboe <axboe@kernel.dk>
Tue, 15 Oct 2019 15:14:51 +0000 (09:14 -0600)
commit3ed8c570e05f15b5eb0061d2cfc07d6c19cc57e8
treeddd72fd8fc5f849fea61d898a20c653a13f819a8
parent35f561eb40bc3fffd6bfa05f39769087b7fceae4
filesetup: use zonerange for map and LFSR with zonemode=strided

When a random map is enabled, cover only the current zone when run with
zonemode=strided. This ensures that when we reach the end of the zone we
wrap around back into the current zone instead of accessing blocks
outside of the zone.

In addition, when an LFSR is used, constrain the blocks generated to the
current zone. Previously, the LFSR random_generator would ignore the
strided zonemode setting.

Fixes: https://github.com/axboe/fio/issues/809
Signed-off-by: Jens Axboe <axboe@kernel.dk>
filesetup.c