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

Christoph Hellwig hch at lst.de
Tue Sep 6 23:44:18 PDT 2022


On Tue, Sep 06, 2022 at 04:16:53PM +0200, Hannes Reinecke wrote:
>>>       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.

I think you and Sagi are talking about difference means of "local".
Your original version just retried in the caller.  Which is a bad idea.
The place where this code retries is the right one, and I think Sagi
agrees.  Abusing a blk-mq level flag for controlling this retry in core
nvme code is not, and I agree with the suggestion form Sagi.



More information about the Linux-nvme mailing list