* [PATCH blktests v2 0/2] zbd: adjust to recent blkzone change
@ 2026-02-20 13:23 Shin'ichiro Kawasaki
2026-02-20 13:23 ` [PATCH blktests v2 1/2] zbd/rc: do not use invalid write pointer values by blkzone report Shin'ichiro Kawasaki
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Shin'ichiro Kawasaki @ 2026-02-20 13:23 UTC (permalink / raw)
To: linux-block; +Cc: Damien Le Moal, Wilfred Mallawa, Shin'ichiro Kawasaki
After the recent change in util-linux [1], 'blkzone report' command no
longer reports numeric values for write pointers when the write pointers
are invalid. This change caused two failure symptoms in the zbd test
group. The first failure symptom is arithmetic failures by evaluating
the string 'N/A' as a numeric value. The second failure symptom is
write pointer validity check failure for conventional zones. The two
patches in this series address the two failure symptoms respectively.
Link: [1] https://github.com/util-linux/util-linux/commit/b032247f48d8b6a13bf8541eb663c779e448f568
Changes from v1:
- 1st patch: Added the check for read-only and offline conditions
- 1st patch: Added the check for conventional zones
- 1st patch: Use the value -1 when write pointers are invalid
- Added the 2nd patch for zbd/002 failure case
- Link to v1: https://lore.kernel.org/linux-block/20260219121940.174239-1-shinichiro.kawasaki@wdc.com/
Shin'ichiro Kawasaki (2):
zbd/rc: do not use invalid write pointer values by blkzone report
zbd/002: do not check write pointers of conventional zones
tests/zbd/002 | 3 ++-
tests/zbd/rc | 19 +++++++++++++++----
2 files changed, 17 insertions(+), 5 deletions(-)
--
2.53.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH blktests v2 1/2] zbd/rc: do not use invalid write pointer values by blkzone report
2026-02-20 13:23 [PATCH blktests v2 0/2] zbd: adjust to recent blkzone change Shin'ichiro Kawasaki
@ 2026-02-20 13:23 ` Shin'ichiro Kawasaki
2026-02-26 4:17 ` Damien Le Moal
2026-02-20 13:23 ` [PATCH blktests v2 2/2] zbd/002: do not check write pointers of conventional zones Shin'ichiro Kawasaki
2026-02-27 6:48 ` [PATCH blktests v2 0/2] zbd: adjust to recent blkzone change Shinichiro Kawasaki
2 siblings, 1 reply; 6+ messages in thread
From: Shin'ichiro Kawasaki @ 2026-02-20 13:23 UTC (permalink / raw)
To: linux-block; +Cc: Damien Le Moal, Wilfred Mallawa, Shin'ichiro Kawasaki
After the recent change in util-linux [1], the 'blkzone report' command
no longer reports numeric values for write pointers when the write
pointers are invalid. Instead, it reports the sting 'N/A'. Currently,
_get_blkzone_report() assumes that the write pointer values are numeric
even when the values are invalid. Then it evaluates 'N/A' as numeric and
triggers arithmetic operation failures.
To avoid the failures, check zone type and zone condition. If the zone
type and condition indicate that the write pointer is invalid, do not
use the blkzone report string. Instead, use -1 as the write pointer
value to indicate the value is invalid.
Link: [1] https://github.com/util-linux/util-linux/commit/b032247f48d8b6a13bf8541eb663c779e448f568
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
tests/zbd/rc | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/tests/zbd/rc b/tests/zbd/rc
index 570928b..32a80a7 100644
--- a/tests/zbd/rc
+++ b/tests/zbd/rc
@@ -141,16 +141,27 @@ _get_blkzone_report() {
fi
local _IFS=$IFS
- local -i loop=0
+ local -i loop=0 cond type
IFS=$' ,:'
while read -r -a _tokens
do
ZONE_STARTS+=($((_tokens[1])))
ZONE_LENGTHS+=($((_tokens[3])))
ZONE_CAPS+=($((_tokens[cap_idx])))
- ZONE_WPTRS+=($((_tokens[wptr_idx])))
- ZONE_CONDS+=($((${_tokens[conds_idx]%\(*})))
- ZONE_TYPES+=($((${_tokens[type_idx]%\(*})))
+ # The latest blkzone reports 'N/A' as write pointers for full
+ # zones. In that case, do not handle it as numeric.
+ cond=$((${_tokens[conds_idx]%\(*}))
+ type=$((${_tokens[type_idx]%\(*}))
+ if ((type == ZONE_TYPE_CONVENTIONAL ||
+ (cond == ZONE_COND_READ_ONLY ||
+ cond == ZONE_COND_FULL ||
+ cond == ZONE_COND_OFFLINE))); then
+ ZONE_WPTRS+=(-1)
+ else
+ ZONE_WPTRS+=($((_tokens[wptr_idx])))
+ fi
+ ZONE_CONDS+=("${cond}")
+ ZONE_TYPES+=("${type}")
if [[ ${ZONE_TYPES[-1]} -eq ${ZONE_TYPE_CONVENTIONAL} ]]; then
(( NR_CONV_ZONES++ ))
fi
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH blktests v2 2/2] zbd/002: do not check write pointers of conventional zones
2026-02-20 13:23 [PATCH blktests v2 0/2] zbd: adjust to recent blkzone change Shin'ichiro Kawasaki
2026-02-20 13:23 ` [PATCH blktests v2 1/2] zbd/rc: do not use invalid write pointer values by blkzone report Shin'ichiro Kawasaki
@ 2026-02-20 13:23 ` Shin'ichiro Kawasaki
2026-02-26 4:18 ` Damien Le Moal
2026-02-27 6:48 ` [PATCH blktests v2 0/2] zbd: adjust to recent blkzone change Shinichiro Kawasaki
2 siblings, 1 reply; 6+ messages in thread
From: Shin'ichiro Kawasaki @ 2026-02-20 13:23 UTC (permalink / raw)
To: linux-block; +Cc: Damien Le Moal, Wilfred Mallawa, Shin'ichiro Kawasaki
After the recent change in util-linux [1], the 'blkzone report' command
no longer reports numeric values for write pointers when the write
pointers are invalid. Instead, now it reports the sting 'N/A'. The test
case zbd/002 assumed that 'blkzone report' command would return valid
write pointer values for conventional zones. The test case worked before
the blkzone change, but now the test fails because of the wrong
assumption.
To avoid the failure, do not check write pointer values when the zone
type is conventional.
Link: [1] https://github.com/util-linux/util-linux/commit/b032247f48d8b6a13bf8541eb663c779e448f568
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
tests/zbd/002 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/zbd/002 b/tests/zbd/002
index 39c2ad5..cd9609d 100755
--- a/tests/zbd/002
+++ b/tests/zbd/002
@@ -80,7 +80,8 @@ _check_blkzone_report() {
fi
# Check write pointer
- if ((cond != ZONE_COND_READ_ONLY &&
+ if ((zone_type != ZONE_TYPE_CONVENTIONAL &&
+ cond != ZONE_COND_READ_ONLY &&
cond != ZONE_COND_FULL &&
cond != ZONE_COND_OFFLINE &&
(wptr < 0 || wptr > len) )); then
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH blktests v2 1/2] zbd/rc: do not use invalid write pointer values by blkzone report
2026-02-20 13:23 ` [PATCH blktests v2 1/2] zbd/rc: do not use invalid write pointer values by blkzone report Shin'ichiro Kawasaki
@ 2026-02-26 4:17 ` Damien Le Moal
0 siblings, 0 replies; 6+ messages in thread
From: Damien Le Moal @ 2026-02-26 4:17 UTC (permalink / raw)
To: Shin'ichiro Kawasaki, linux-block; +Cc: Wilfred Mallawa
On 2/20/26 22:23, Shin'ichiro Kawasaki wrote:
> After the recent change in util-linux [1], the 'blkzone report' command
> no longer reports numeric values for write pointers when the write
> pointers are invalid. Instead, it reports the sting 'N/A'. Currently,
> _get_blkzone_report() assumes that the write pointer values are numeric
> even when the values are invalid. Then it evaluates 'N/A' as numeric and
> triggers arithmetic operation failures.
>
> To avoid the failures, check zone type and zone condition. If the zone
> type and condition indicate that the write pointer is invalid, do not
> use the blkzone report string. Instead, use -1 as the write pointer
> value to indicate the value is invalid.
>
> Link: [1] https://github.com/util-linux/util-linux/commit/b032247f48d8b6a13bf8541eb663c779e448f568
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Looks good to me.
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH blktests v2 2/2] zbd/002: do not check write pointers of conventional zones
2026-02-20 13:23 ` [PATCH blktests v2 2/2] zbd/002: do not check write pointers of conventional zones Shin'ichiro Kawasaki
@ 2026-02-26 4:18 ` Damien Le Moal
0 siblings, 0 replies; 6+ messages in thread
From: Damien Le Moal @ 2026-02-26 4:18 UTC (permalink / raw)
To: Shin'ichiro Kawasaki, linux-block; +Cc: Wilfred Mallawa
On 2/20/26 22:23, Shin'ichiro Kawasaki wrote:
> After the recent change in util-linux [1], the 'blkzone report' command
> no longer reports numeric values for write pointers when the write
> pointers are invalid. Instead, now it reports the sting 'N/A'. The test
> case zbd/002 assumed that 'blkzone report' command would return valid
> write pointer values for conventional zones. The test case worked before
> the blkzone change, but now the test fails because of the wrong
> assumption.
>
> To avoid the failure, do not check write pointer values when the zone
> type is conventional.
>
> Link: [1] https://github.com/util-linux/util-linux/commit/b032247f48d8b6a13bf8541eb663c779e448f568
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Looks good to me.
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH blktests v2 0/2] zbd: adjust to recent blkzone change
2026-02-20 13:23 [PATCH blktests v2 0/2] zbd: adjust to recent blkzone change Shin'ichiro Kawasaki
2026-02-20 13:23 ` [PATCH blktests v2 1/2] zbd/rc: do not use invalid write pointer values by blkzone report Shin'ichiro Kawasaki
2026-02-20 13:23 ` [PATCH blktests v2 2/2] zbd/002: do not check write pointers of conventional zones Shin'ichiro Kawasaki
@ 2026-02-27 6:48 ` Shinichiro Kawasaki
2 siblings, 0 replies; 6+ messages in thread
From: Shinichiro Kawasaki @ 2026-02-27 6:48 UTC (permalink / raw)
To: linux-block@vger.kernel.org; +Cc: Damien Le Moal, Wilfred Mallawa
On Feb 20, 2026 / 22:23, Shin'ichiro Kawasaki wrote:
> After the recent change in util-linux [1], 'blkzone report' command no
> longer reports numeric values for write pointers when the write pointers
> are invalid. This change caused two failure symptoms in the zbd test
> group. The first failure symptom is arithmetic failures by evaluating
> the string 'N/A' as a numeric value. The second failure symptom is
> write pointer validity check failure for conventional zones. The two
> patches in this series address the two failure symptoms respectively.
>
> Link: [1] https://github.com/util-linux/util-linux/commit/b032247f48d8b6a13bf8541eb663c779e448f568
FYI, I applied the patches. Of note is that I made a slight change to the
block comment in the first patch when I applied it.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-02-27 6:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-20 13:23 [PATCH blktests v2 0/2] zbd: adjust to recent blkzone change Shin'ichiro Kawasaki
2026-02-20 13:23 ` [PATCH blktests v2 1/2] zbd/rc: do not use invalid write pointer values by blkzone report Shin'ichiro Kawasaki
2026-02-26 4:17 ` Damien Le Moal
2026-02-20 13:23 ` [PATCH blktests v2 2/2] zbd/002: do not check write pointers of conventional zones Shin'ichiro Kawasaki
2026-02-26 4:18 ` Damien Le Moal
2026-02-27 6:48 ` [PATCH blktests v2 0/2] zbd: adjust to recent blkzone change Shinichiro Kawasaki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox