[PATCH] nvme: retry commands if DNR bit is not set

Hannes Reinecke hare at suse.de
Wed Feb 1 05:55:20 PST 2023


On 2/1/23 14:09, Christoph Hellwig wrote:
> On Wed, Feb 01, 2023 at 12:50:01PM +0100, Hannes Reinecke wrote:
>> Add a 'retry' argument to __nvme_submit_sync_cmd() to instruct
>> the function to not set the FAILFAST_DRIVER bit for the command,
>> causing it to be retried in nvme_decide_disposition() if the DNR
>> bit is not set in the command result.
>> And modify the authentication code to allow for retries.
> 
> This is missing the why.  And maybe we can find a better interace than
> a magic bool flag.

The 'why' is that commands submitted internally (via 
nvme_submit_sync_cmd() and friends are typically normal NVMe commands, 
and as such should be subjected to the normal 'DNR' evaluation rules.
This has been an issue with the authentication protocol commands in 
particular, but I've got reports that the 'connect' command itself might 
also be affected.

Of course we can discuss the interface; personally I found the flag not 
a bad idea...

Cheers,

Hannes






More information about the Linux-nvme mailing list