zbd: avoid write with rwmixwrite=0 option
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Wed, 20 Dec 2023 00:58:45 +0000 (09:58 +0900)
committerJens Axboe <axboe@kernel.dk>
Wed, 20 Dec 2023 02:52:35 +0000 (19:52 -0700)
commitcbbfe5a9c91895b382aff061bff658c211acd495
treea284293a564c787ee0d5e855e9099f8a265dc58c
parentc77fe6859b6ef937a6ca900c1fab009175d721f8
zbd: avoid write with rwmixwrite=0 option

Since the commit fb0259fb276a ("zbd: Ensure first I/O is write for
random read/write to sequential zones"), fio issues write as the first
I/O when zonemode=zbd and rw=randrw options are specified. However, fio
issues the first write even when rwmixwrite=0 option is specified. Users
do not expect such write and it confuses the users. To avoid the
confusion, suppress the write by referring td->o.rwmix[DDIR_WRITE].

Fixes: fb0259fb276a ("zbd: Ensure first I/O is write for random read/write to sequential zones")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20231220005846.1371456-2-shinichiro.kawasaki@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
zbd.c