[PATCH 5/6] nvme-auth: set DNR bit on non-retryable errors

Hannes Reinecke hare at suse.de
Wed Nov 2 01:40:11 PDT 2022


On 11/2/22 09:02, Christoph Hellwig wrote:
> On Wed, Nov 02, 2022 at 08:52:23AM +0100, Hannes Reinecke wrote:
>> diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c
>> index b4af8661c988..6ca0c2bb06c0 100644
>> --- a/drivers/nvme/host/auth.c
>> +++ b/drivers/nvme/host/auth.c
>> @@ -151,7 +151,7 @@ static int nvme_auth_process_dhchap_challenge(struct nvme_ctrl *ctrl,
>>   
>>   	if (chap->buf_size < size) {
>>   		chap->status = NVME_AUTH_DHCHAP_FAILURE_INCORRECT_PAYLOAD;
>> -		return NVME_SC_INVALID_FIELD;
>> +		return NVME_SC_DNR | NVME_SC_INVALID_FIELD;
> 
> Any use of NVME_SC_ for error purely in host software are bogus.  This
> should be using Linux error codes.

I knew you would be saying that.
I was worrying about retryable and non-retryable errors, but seeing that 
all errors are currently treated as non-retryable I'll be changing it to 
return error codes.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		           Kernel Storage Architect
hare at 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




More information about the Linux-nvme mailing list