public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Sagi Grimberg <sagi@grimberg.me>, Christoph Hellwig <hch@lst.de>
Cc: Keith Busch <kbusch@kernel.org>,
	linux-nvme@lists.infradead.org,
	Martin George <marting@netapp.com>
Subject: Re: [PATCH 1/2] nvme-auth: retry command if DNR bit is not set
Date: Tue, 6 Sep 2022 16:16:53 +0200	[thread overview]
Message-ID: <d13ce9ac-e851-369a-fe58-1bfebe5cb7c7@suse.de> (raw)
In-Reply-To: <db927303-525f-6925-7b26-a0f4d8545dad@grimberg.me>

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@netapp.com>
>> Signed-off-by: Hannes Reinecke <hare@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@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


  reply	other threads:[~2022-09-06 15:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30 12:49 [PATCHv2 0/2] nvme: honor DNR status for authentication Hannes Reinecke
2022-08-30 12:49 ` [PATCH 1/2] nvme-auth: retry command if DNR bit is not set Hannes Reinecke
2022-09-05 12:05   ` Sagi Grimberg
2022-09-06 14:16     ` Hannes Reinecke [this message]
2022-09-07  6:44       ` Christoph Hellwig
2022-08-30 12:49 ` [PATCH 2/2] nvme-auth: set the DNR bit if authentication failed Hannes Reinecke
2022-09-05 11:52   ` Sagi Grimberg
2022-09-07  6:46   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d13ce9ac-e851-369a-fe58-1bfebe5cb7c7@suse.de \
    --to=hare@suse.de \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=marting@netapp.com \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox