From: Damien Le Moal Date: Fri, 8 May 2020 07:56:41 +0000 (+0900) Subject: zbd: Fix read with verify X-Git-Tag: fio-3.20~17 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=ecc9e8f753028d91ce365ca2164e3e8e2257e966;p=fio.git zbd: Fix read with verify For a read only workload with verify option enabled, executing zbd_replay_write_order() will ignore target zones that are full and try to open another zone. This either triggers an assert if max_open_zones is unused, or result in verify failing. Fix this by executing zbd_replay_write_order() only for writing workloads. This fix is also consistent with the fact that zoned devices do not implicitly open zones for read operations. Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe --- diff --git a/zbd.c b/zbd.c index 5aaf1e2c..c30454b9 100644 --- a/zbd.c +++ b/zbd.c @@ -1409,7 +1409,8 @@ enum io_u_action zbd_adjust_block(struct thread_data *td, struct io_u *io_u) switch (io_u->ddir) { case DDIR_READ: if (td->runstate == TD_VERIFYING) { - zb = zbd_replay_write_order(td, io_u, zb); + if (td_write(td)) + zb = zbd_replay_write_order(td, io_u, zb); goto accept; } /*