Re: [PATCH v2] null_blk: add support for max open/active zone limit for zoned devices

From: Klaus Jensen
Date: Fri Aug 28 2020 - 03:32:07 EST


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.

Attachment: signature.asc
Description: PGP signature