When verify options is specified, zbd_file_reset() resets zones only when td status is not TD_VERIFYING so that the data to read back for verify is not wiped out. However, when verify_backlog option is set, the verify data can be left even if td status is not TD_VERIFYING . This causes verify failure. Fix this by improving the condition to reset zones in zbd_file_reset(). Refer not only td status but also verify_batch and io_hist_len values to avoid zone reset when verify_backlog option is set. This is same check as check_get_verify(). Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx> --- zbd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zbd.c b/zbd.c index 3855ab0e..b2f43860 100644 --- a/zbd.c +++ b/zbd.c @@ -1246,6 +1246,7 @@ void zbd_file_reset(struct thread_data *td, struct fio_file *f) { struct fio_zone_info *zb, *ze; uint64_t swd; + bool verify_ongoing; if (!f->zbd_info || !td_write(td)) return; @@ -1262,7 +1263,10 @@ void zbd_file_reset(struct thread_data *td, struct fio_file *f) * writing any data to avoid that a zone reset has to be issued while * writing data, which causes data loss. */ - if (td->o.verify != VERIFY_NONE && td->runstate != TD_VERIFYING) + verify_ongoing = td->runstate == TD_VERIFYING || td->verify_batch; + if (td->io_hist_len && td->o.verify_backlog) + verify_ongoing = td->io_hist_len % td->o.verify_backlog; + if (td->o.verify != VERIFY_NONE && !verify_ongoing) zbd_reset_zones(td, f, zb, ze); zbd_reset_write_cnt(td, f); } -- 2.37.1