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>
if (ddir != DDIR_READ || !td_rw(td))
return ddir;
if (ddir != DDIR_READ || !td_rw(td))
return ddir;
- if (io_u->file->last_start[DDIR_WRITE] != -1ULL || td->o.read_beyond_wp)
+ if (io_u->file->last_start[DDIR_WRITE] != -1ULL ||
+ td->o.read_beyond_wp || td->o.rwmix[DDIR_WRITE] == 0)
return DDIR_READ;
return DDIR_WRITE;
return DDIR_READ;
return DDIR_WRITE;