Re: [PATCH 4/4] nvme-fc: return NVME_SC_HOST_ABORTED_CMD when a command has been aborted
From: Hannes Reinecke <hare@suse.de>
Date: 2021-03-02 07:10:06
On 3/1/21 8:07 PM, James Smart wrote:
On 2/25/2021 11:17 PM, Hannes Reinecke wrote:quoted
When a command has been aborted we should return NVME_SC_HOST_ABORTED_CMD to be consistent with the other transports. Cc: James Smart <redacted> Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Daniel Wagner <redacted> --- drivers/nvme/host/fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c index ef12a619daec..97e3424c7b03 100644 --- a/drivers/nvme/host/fc.c +++ b/drivers/nvme/host/fc.c@@ -1956,7 +1956,7 @@ nvme_fc_fcpio_done(struct nvmefc_fcp_req *req)sizeof(op->rsp_iu), DMA_FROM_DEVICE); if (opstate == FCPOP_STATE_ABORTED) - status = cpu_to_le16(NVME_SC_HOST_PATH_ERROR << 1); + status = cpu_to_le16(NVME_SC_HOST_ABORTED_CMD << 1); else if (freq->status) { status = cpu_to_le16(NVME_SC_HOST_PATH_ERROR << 1); dev_info(ctrl->ctrl.device,Is there a difference between an I/O aborted by a NVME ABORT cmd vs a transport-cancelled io ? This line is more the transport-cancelled io.
Well, as we have several distinct error codes for that: 0x07 (Command abort requested) is for commands terminated by NVME Abort 0x08 (Command aborted due to SQ deletion) is for commands terminated due to an explicit 'Delete I/O submission queue' command 0x370 (Host pathing error) is for any random host pathing error 0x371 (Command aborted by host) is for commands being aborted 'as a result of a host action' arguably both (0x370 and 0x371) can be used when failing I/O on path loss, but all other transports are using 0x371 here, so FC really should be using the same convention to have consistent error handling. Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), GF: Felix Imendörffer _______________________________________________ Linux-nvme mailing list Linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme