Re: [PATCH 05/11] zbd: verify before zone reset for zone_reset_threshold option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2022-10-21 at 15:34 +0900, Shin'ichiro Kawasaki wrote:
> 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>

Looks good.

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 61856ad1..3855ab0e 100644
> --- a/zbd.c
> +++ b/zbd.c
> @@ -2029,7 +2029,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





[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux