[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 2/5] hw/block/nvme: pull aio error handling
From: |
Keith Busch |
Subject: |
Re: [PATCH v8 2/5] hw/block/nvme: pull aio error handling |
Date: |
Mon, 16 Nov 2020 09:57:13 -0800 |
On Thu, Nov 12, 2020 at 08:59:42PM +0100, Klaus Jensen wrote:
> +static void nvme_aio_err(NvmeRequest *req, int ret)
> +{
> + uint16_t status = NVME_SUCCESS;
> + Error *local_err = NULL;
> +
> + switch (req->cmd.opcode) {
> + case NVME_CMD_READ:
> + status = NVME_UNRECOVERED_READ;
> + break;
> + case NVME_CMD_FLUSH:
> + case NVME_CMD_WRITE:
> + case NVME_CMD_WRITE_ZEROES:
> + status = NVME_WRITE_FAULT;
> + break;
> + default:
> + status = NVME_INTERNAL_DEV_ERROR;
> + break;
> + }
Just curious, is there potentially a more appropriate way to set an nvme
status based on the value of 'ret'? What is 'ret' representing anyway?
Are these errno values?