zbd: Ensure first I/O is write for random read/write to sequential zones
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Mon, 13 Apr 2020 08:33:00 +0000 (17:33 +0900)
committerJens Axboe <axboe@kernel.dk>
Mon, 13 Apr 2020 14:22:14 +0000 (08:22 -0600)
commitfb0259fb276a5141f957a6521c019f2c8bc71046
tree6e8423bf673d368a2bc7fd6e191d0155c8d68526
parent63a52199be6061560476353cdabe01a9458657d4
zbd: Ensure first I/O is write for random read/write to sequential zones

In case read is chosen for the first random I/O for sequential write
required zones, fio stops because no data can be read from the zones with
empty status. Enforce to write at the first I/O to make sure data to read
exists for the following read operations.

The unexpected fio stop symptom was observed with test case #30 of
t/zbd/test-zbd-support. When the test case was run repeatedly resetting
all zones with -r option, it often passes with too short run time.

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