[PATCHv2 2/2] nvme: translate zone resource errors
Damien Le Moal
Damien.LeMoal at wdc.com
Thu Sep 17 02:14:21 EDT 2020
On 2020/09/17 14:48, hch at lst.de wrote:
> On Wed, Sep 16, 2020 at 02:00:54PM -0700, Keith Busch wrote:
>> I believe it's safe to use for the completion side since the special
>> handling is only for submission errors. But I agree this type of double
>> meaning could invite confusion. I'll send a v3 with your suggestion and
>> we'll see how that goes.
>
> Two remarks: Can you include the scsi patch for Damien so that ZNS
> and ZBC/ZAC are handled together? Should we use a separate status
> for active vs open zones?
I did not think about that... It will not matter for ZBC/ZAC since there is no
limit on active zones, but that indeed could be useful for ZNS. And with
Johannes "explicit_open" series for zonefs, open() of a zonefs file would return
different error codes to the application for max open exceeded vs max active
exceeded. Same for raw block devices ioctls or write operations.
Hmm. So we need 2 BLK_STS and 2 errno. Not a big change but I am out of idea for
the second errno... EOVERFLOW for max active error ?
Max open zones error: BLK_STS_ZONE_MOR -> ETOOMANYREFS
Mac active zones error: BLK_STS_ZONE_MAR -> EOVERFLOW
May be.
--
Damien Le Moal
Western Digital Research
More information about the Linux-nvme
mailing list