[PATCH] nvme: translate zns errors to blk_status_t
Damien Le Moal
Damien.LeMoal at wdc.com
Thu Sep 10 18:25:24 EDT 2020
On 2020/09/10 14:34, Christoph Hellwig wrote:
> On Wed, Sep 09, 2020 at 01:33:24PM -0700, Keith Busch wrote:
>> EBUSY is the appropriate errno for commands that complete with zone
>> resource errors.
>>
>> Signed-off-by: Keith Busch <kbusch at kernel.org>
>> ---
>> drivers/nvme/host/core.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
>> index ea1fa41fbba8..aff556837115 100644
>> --- a/drivers/nvme/host/core.c
>> +++ b/drivers/nvme/host/core.c
>> @@ -249,6 +249,9 @@ static blk_status_t nvme_error_status(u16 status)
>> return BLK_STS_NEXUS;
>> case NVME_SC_HOST_PATH_ERROR:
>> return BLK_STS_TRANSPORT;
>> + case NVME_SC_ZONE_TOO_MANY_ACTIVE:
>> + case NVME_SC_ZONE_TOO_MANY_OPEN:
>> + return BLK_STS_DEV_RESOURCE;
>
> 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() ?
--
Damien Le Moal
Western Digital Research
More information about the Linux-nvme
mailing list