public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	Wilfred Mallawa <wilfred.mallawa@wdc.com>
Subject: Re: [PATCH blktests] zbd: do not handle write pointer values as numeric for full zones
Date: Fri, 20 Feb 2026 11:01:17 +0000	[thread overview]
Message-ID: <aZg-EXnRWuDY_BRP@shinmob> (raw)
In-Reply-To: <2c3d9a18-c1fa-44d1-b5b5-0d436f5c3b2e@kernel.org>

On Feb 20, 2026 / 06:35, Damien Le Moal wrote:
> On 2/19/26 21:22, Shin'ichiro Kawasaki wrote:
> >  	local _IFS=$IFS
> > -	local -i loop=0
> > +	local -i loop=0 cond
> >  	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]%\(*})))
> > +		# 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]%\(*}))
> > +		if ((cond == ZONE_COND_FULL)); then
> 
> Missing handling of readonly and offline too. These also have invalid WP.

That's right. And I noticed that the latest blkzone reports "N/A" as write
pointers for conventional zones also. Then the above part will need to check
zone type also.

> 
> Anyway, why even look at the output from blkzone for this case ? The WP is
> invalid, so its value is "garbage" !
> Why not simply something like:
> 
> 		ZONE_WPTRS+=($(( $((_tokens[1])) + $((_tokens[3])))
> 
> or just use ULLONG_MAX/-1 for the value. Any value will do. Doing so, you are
> not dependent on what blkzone displays for full, readonly and offline zones.

That sounds good. I will revise this patch to -1 in v2.

  reply	other threads:[~2026-02-20 11:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-19 12:22 [PATCH blktests] zbd: do not handle write pointer values as numeric for full zones Shin'ichiro Kawasaki
2026-02-19 21:35 ` Damien Le Moal
2026-02-20 11:01   ` Shinichiro Kawasaki [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-02-19 12:19 Shin'ichiro Kawasaki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aZg-EXnRWuDY_BRP@shinmob \
    --to=shinichiro.kawasaki@wdc.com \
    --cc=dlemoal@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=wilfred.mallawa@wdc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox