From: Klaus Jensen <its@irrelevant.dk>
To: Damien Le Moal <Damien.LeMoal@wdc.com>
Cc: Niklas Cassel <Niklas.Cassel@wdc.com>,
Jens Axboe <axboe@kernel.dk>,
Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] null_blk: add support for max open/active zone limit for zoned devices
Date: Fri, 28 Aug 2020 09:47:28 +0200 [thread overview]
Message-ID: <20200828074728.GA1343822@apples.localdomain> (raw)
In-Reply-To: <CY4PR04MB37514386D6A94A04F66EFF1DE7520@CY4PR04MB3751.namprd04.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 2271 bytes --]
On Aug 28 07:36, Damien Le Moal wrote:
> On 2020/08/28 16:23, Klaus Jensen wrote:
> > On Aug 28 07:06, Damien Le Moal wrote:
> >> On 2020/08/27 22:50, Niklas Cassel wrote:
> >>> +static blk_status_t null_finish_zone(struct nullb_device *dev, struct blk_zone *zone)
> >>> +{
> >>> + if (zone->type == BLK_ZONE_TYPE_CONVENTIONAL)
> >>> + return BLK_STS_IOERR;
> >>> +
> >>> + switch (zone->cond) {
> >>> + case BLK_ZONE_COND_FULL:
> >>> + /* finish operation on full is not an error */
> >>> + return BLK_STS_OK;
> >>> + case BLK_ZONE_COND_EMPTY:
> >>> + if (!null_manage_zone_resources(dev, zone))
> >>
> >> OK. So you are hitting a fuzzy case here that is not actually well described in
> >> the standards. That is, does finishing an empty zone necessarilly imply a
> >> temporary transition through imp open ? Which you are assuming is a yes here.
> >> Personally, I would say that is not necessary, but no strong feeling either way.
> >>
> >
> > For ZNS, the spec is pretty clear that ZSE to ZSF is a legal direct
> > transition. So I don't think the transition should be allowed to fail
> > due to a lack of resources.
>
> I had a doubt and checked again ZBC & ZAC. I section 4.4.3.2.4 it says:
>
> The Zone Condition state machine (see 4.4.3.5) requires the specified zone to
> have a Zone Condition of EXPLICITLY OPENED or IMPLICITLY OPENED before a finish
> zone operation is performed. If a zone with a Zone Condition of EMPTY or CLOSED
> is specified for a finish zone operation, prior to processing the finish zone
> operation, then the Zone Condition state machine requires that:
> a) a manage open zone resources operation (see 4.4.3.2.6) be performed; and
> b) the Zone Condition becomes IMPLICITLY OPENED.
>
> And section 5.3 describing the zone finish command points to this section.
> So this is not the same as ZNS.
>
> As Niklas mentioned, nullblk tends to follow more ZBC than ZNS, so the code is
> correct in this respect. We could also lean toward ZNS on this one. I personally
> have no strong opinion either way since there is not real good reasons for
> finishing an empty zone that I can think of.
>
>
Alrighty then; thanks for looking it up! I won't fight for the ZNS
behavior then :)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-08-28 7:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 13:50 [PATCH v2] null_blk: add support for max open/active zone limit for zoned devices Niklas Cassel
2020-08-27 14:51 ` Randy Dunlap
2020-08-27 15:04 ` Damien Le Moal
2020-08-27 16:14 ` Randy Dunlap
2020-08-28 7:06 ` Damien Le Moal
2020-08-28 7:22 ` Klaus Jensen
2020-08-28 7:36 ` Damien Le Moal
2020-08-28 7:47 ` Klaus Jensen [this message]
2020-08-28 7:54 ` Damien Le Moal
2020-08-28 10:06 ` Niklas Cassel
2020-08-28 10:29 ` Damien Le Moal
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=20200828074728.GA1343822@apples.localdomain \
--to=its@irrelevant.dk \
--cc=Damien.LeMoal@wdc.com \
--cc=Johannes.Thumshirn@wdc.com \
--cc=Niklas.Cassel@wdc.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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