public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Hannes Reinecke <hare@suse.de>
Cc: Sagi Grimberg <sagi@grimberg.me>, Christoph Hellwig <hch@lst.de>,
	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: Wed, 7 Sep 2022 08:44:18 +0200	[thread overview]
Message-ID: <20220907064418.GA21620@lst.de> (raw)
In-Reply-To: <d13ce9ac-e851-369a-fe58-1bfebe5cb7c7@suse.de>

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.


  reply	other threads:[~2022-09-07  6:54 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
2022-09-07  6:44       ` Christoph Hellwig [this message]
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=20220907064418.GA21620@lst.de \
    --to=hch@lst.de \
    --cc=hare@suse.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