[PATCH] nvme: translate zns errors to blk_status_t
Christoph Hellwig
hch at lst.de
Thu Sep 10 01:26:43 EDT 2020
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.
More information about the Linux-nvme
mailing list