Re: [PATCH 2/3] t/zbd: Fix a bug in reset_zone() for all zones reset

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

 



On 2020/04/13 17:33, Shin'ichiro Kawasaki wrote:
> The bash function reset_zone() is expected to reset all zones when -1 is
> provided as its second argument. However, it fails to reset all zones
> using blkzone command because of wrong and unnecessary options provided
> to blkzone. Remove the option to fix it.
> 
> This failure was found with running test-zbd-support with -r option.
> 
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>
> ---
>  t/zbd/functions | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/t/zbd/functions b/t/zbd/functions
> index 5bffad6e..1bd22ec4 100644
> --- a/t/zbd/functions
> +++ b/t/zbd/functions
> @@ -97,8 +97,7 @@ reset_zone() {
>  
>      if [ -n "${blkzone}" ] && [ ! -n "${use_libzbc}" ]; then
>  	if [ "$offset" -lt 0 ]; then
> -	    sectors=$(<"/sys/class/block/${dev#/dev/}/size")
> -	    ${blkzone} reset -o "${offset}" -l "$sectors" "$dev"
> +	    ${blkzone} reset "$dev"
>  	else
>  	    ${blkzone} reset -o "${offset}" -c 1 "$dev"
>  	fi
> 

Looks good.

Reviewed-by: Damien Le Moal <damien.lemoaal@xxxxxxx>


-- 
Damien Le Moal
Western Digital Research




[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