From 63a52199be6061560476353cdabe01a9458657d4 Mon Sep 17 00:00:00 2001 From: Shin'ichiro Kawasaki Date: Mon, 13 Apr 2020 17:32:59 +0900 Subject: [PATCH] t/zbd: Fix a bug in reset_zone() for all zones reset 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. Reviewed-by: Damien Le Moal Signed-off-by: Shin'ichiro Kawasaki Signed-off-by: Jens Axboe --- 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 -- 2.25.1