When verify option is specified together with zonemode=zbd and zone_reset_threshold option, zone reset happens to zones not full. This erases data for verify and causes verify failure. Current implementation avoids this scenario by assert. To allow zone_reset_threshold option together with zonemode=zbd and verify option, do verify before the zone reset. When zone reset is required to an open zone with verify data, call get_next_verify() to get verify read unit and return it from zbd_adjust_block(). Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx> Tested-by: Dmitry Fomichev <dmitry.fomichev@xxxxxxx> Reviewed-by: Dmitry Fomichev <dmitry.fomichev@xxxxxxx> --- zbd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zbd.c b/zbd.c index 6f4e5ab2..af761c17 100644 --- a/zbd.c +++ b/zbd.c @@ -2032,7 +2032,10 @@ retry: /* Reset the zone pointer if necessary */ if (zb->reset_zone || zbd_zone_full(f, zb, min_bs)) { - assert(td->o.verify == VERIFY_NONE); + if (td->o.verify != VERIFY_NONE && + !get_next_verify(td, io_u)) + goto accept; + /* * Since previous write requests may have been submitted * asynchronously and since we will submit the zone -- 2.37.1