[PATCH 1/2] nvme-auth: retry command if DNR bit is not set

Hannes Reinecke hare at suse.de
Tue Sep 6 07:16:53 PDT 2022


On 9/5/22 14:05, Sagi Grimberg wrote:
> 
> 
> On 8/30/22 15:49, Hannes Reinecke wrote:
>> If the cqe returns a status with the DNR bit not set we should
>> retry the command; otherwise we might incur spurious failures.
>>
>> Reported-by: Martin George <marting at netapp.com>
>> Signed-off-by: Hannes Reinecke <hare at suse.de>
>> ---
>>   drivers/nvme/host/auth.c |  2 +-
>>   drivers/nvme/host/core.c | 20 ++++++++++++++++++--
>>   include/linux/blk-mq.h   |  2 ++
>>   3 files changed, 21 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c
>> index c8a6db7c4498..4ca3f7d042f1 100644
>> --- a/drivers/nvme/host/auth.c
>> +++ b/drivers/nvme/host/auth.c
>> @@ -69,7 +69,7 @@ static int nvme_auth_submit(struct nvme_ctrl *ctrl, 
>> int qid,
>>       ret = __nvme_submit_sync_cmd(q, &cmd, NULL, data, data_len,
>>                        qid == 0 ? NVME_QID_ANY : qid,
>> -                     0, flags);
>> +                     0, BLK_MQ_REQ_RETRY | flags);
> 
> Surely there is a local way to have this than to leak a flag to
> blk-mq...
> 

Sigh. That was the first attempt I did. Which got rejected by Christoph, 
who wanted to have it generic.

Personally I _did_ like the first version better, for precisely the 
reasons you mentioned.

But if the maintainer requests a change, who am I to object ...

So what to do now?

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: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman



More information about the Linux-nvme mailing list