[PATCH] nvme: translate zns errors to blk_status_t

Keith Busch kbusch at kernel.org
Fri Sep 11 14:08:05 EDT 2020


On Fri, Sep 11, 2020 at 09:35:31AM +0000, Damien Le Moal wrote:
> On 2020/09/11 15:10, Christoph Hellwig wrote:
> > On Thu, Sep 10, 2020 at 10:25:24PM +0000, Damien Le Moal wrote:
> >>> I'm not sure this is the best idea, we probably need specific error codes
> >>> if we want file systems to be aware of the limit.
> >>
> >> Do you mean something else than -EBUSY being returned to the user by the block
> >> layer ? Or a different/specific BLK_STS_XXX code which translates into -EBUSY in
> >> blk_status_to_errno() ?
> > 
> > My primary aim is a different BLK_STS_ code.  But given that I think
> > that we should not map different BLK_STS_ codes to the same errno if
> > we can avoid it, we should probably also use a different errno.
> > 
> 
> Hmm. Beside EBUSY, I do not see a nice existing errno that we can reuse. May be
> ENOSR (out of stream resources) ? Or do we define a new one ? EZBUSY ?
> 
> And indeed if we define a new BLK_STS_ZONE_RESOURCE and map that to EBUSY,
> errno_to_blkstatus() will get confused.

It's not often I get to help define a new errno, so I'm a bit cautious
of that route. But if that's the recommendation, then sure, sounds fun.



More information about the Linux-nvme mailing list