zbd: Fix initial zone write pointer of regular block devices
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Wed, 15 Jul 2020 04:13:15 +0000 (13:13 +0900)
committerJens Axboe <axboe@kernel.dk>
Fri, 17 Jul 2020 13:32:12 +0000 (07:32 -0600)
commitb14651a21f93e905b6c18b25770e718e106b03fb
treee2c90228b3ffcd6776415fe8d01debaede100b15
parent37e8cc62319b30927a3147e25b16c3e00b84692f
zbd: Fix initial zone write pointer of regular block devices

With zonemode=zbd and regular block devices, fio initializes zone status
as empty. However, write pointers are set not at zone start but at zone
end. This inconsistency between write pointer position and zone status
caused different behavior from zoned block devices. Fix the inconsistency
by setting initial write pointer at zone start.

Of note is that every fio run with zonemode=zbd and regular block devices
starts with empty zones. Then read workloads just ends without any data
to read. To run read workload, specify read_beyond_wp option. Or specify
two jobs to a single fio command: write job to prepare data for read and
read job which waits for the write job completion.

Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
zbd.c