[PATCH 5/6] nvme: return NVME_SC_ABORT_QUEUE for cancelled commands

Hannes Reinecke hare at suse.de
Fri Feb 26 02:00:09 EST 2021


On 2/26/21 1:59 AM, Chao Leng wrote:
> 
> 
> On 2021/2/25 18:55, Hannes Reinecke wrote:
>> A request will be cancelled when a queue is deleted, so we should
>> be returning a status of NVME_SC_ABORT_QUEUE.
>>
>> Signed-off-by: Hannes Reinecke <hare at suse.de>
>> ---
>>   drivers/nvme/host/core.c | 2 +-
>>   drivers/nvme/host/fc.c   | 9 ++++++---
>>   2 files changed, 7 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
>> index 04dc85e0810c..624531a6b7c6 100644
>> --- a/drivers/nvme/host/core.c
>> +++ b/drivers/nvme/host/core.c
>> @@ -379,7 +379,7 @@ bool nvme_cancel_request(struct request *req, void 
>> *data, bool reserved)
>>       if (blk_mq_request_completed(req))
>>           return true;
>> -    nvme_req(req)->status = NVME_SC_HOST_ABORTED_CMD;
>> +    nvme_req(req)->status = NVME_SC_ABORT_QUEUE;
> Use NVME_SC_ABORT_QUEUE instead of NVME_SC_HOST_ABORTED_CMD is not a 
> good idea.
> NVME_SC_HOST_ABORTED_CMD is a host path related error, Now used to check 
> if need fail over retry by multipath.

You are correct; this patch will be dropped for the next iteration.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare at suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer



More information about the Linux-nvme mailing list