From: Hannes Reinecke <hare@suse.de>
To: Daniel Wagner <dwagner@suse.de>, Sagi Grimberg <sagi@grimberg.me>
Cc: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
James Smart <jsmart2021@gmail.com>
Subject: Re: [PATCH blktests v3] nvme/046: test queue count changes on reconnect
Date: Thu, 15 Sep 2022 17:41:46 +0200 [thread overview]
Message-ID: <381b003e-3510-8cbf-031d-b5314b17560d@suse.de> (raw)
In-Reply-To: <20220915125037.fqhcokdn4scnklyq@carbon.lan>
On 9/15/22 14:50, Daniel Wagner wrote:
>> So do we agree the fc host should not stop reconnecting? James?
>
> With the change below the test succeeds once:
>
> diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
> index 42767fb75455..b167cf9fee6d 100644
> --- a/drivers/nvme/host/fc.c
> +++ b/drivers/nvme/host/fc.c
> @@ -3325,8 +3325,6 @@ nvme_fc_reconnect_or_delete(struct nvme_fc_ctrl *ctrl, int status)
> dev_info(ctrl->ctrl.device,
> "NVME-FC{%d}: reset: Reconnect attempt failed (%d)\n",
> ctrl->cnum, status);
> - if (status > 0 && (status & NVME_SC_DNR))
> - recon = false;
> } else if (time_after_eq(jiffies, rport->dev_loss_end))
> recon = false;
>
> This part was introduced with f25f8ef70ce2 ("nvme-fc: short-circuit
> reconnect retries"):
>
> nvme-fc: short-circuit reconnect retries
>
> Returning an nvme status from nvme_fc_create_association() indicates
> that the association is established, and we should honour the DNR bit.
> If it's set a reconnect attempt will just return the same error, so
> we can short-circuit the reconnect attempts and fail the connection
> directly.
>
> It looks like the reasoning here didn't take into consideration the
> scenario we have here. I'd say we should not do it and handle it similar
> as with have with tcp/rdma.
>
But that is wrong.
When we are evaluating the NVMe status we _need_ to check the DNR bit;
that's precisely what it's for.
The real reason here is a queue inversion with fcloop; we've had them
for ages, and I'm not surprised that it pops off now.
In fact, I was quite surprised that I didn't hit it when updating
blktests; in previous versions I had to insert an explicit 'sleep 2'
before disconnect to make it work.
I'd rather fix that than reverting FC to the (wrong) behaviour.
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
next prev parent reply other threads:[~2022-09-15 15:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-13 6:57 [PATCH blktests v3] nvme/046: test queue count changes on reconnect Daniel Wagner
2022-09-13 10:57 ` Shinichiro Kawasaki
2022-09-13 11:42 ` Daniel Wagner
2022-09-13 17:10 ` Daniel Wagner
2022-09-14 9:00 ` Daniel Wagner
2022-09-14 10:37 ` Sagi Grimberg
2022-09-14 11:07 ` Daniel Wagner
2022-09-15 11:33 ` Daniel Wagner
2022-09-15 12:50 ` Daniel Wagner
2022-09-15 15:41 ` Hannes Reinecke [this message]
2022-09-16 6:30 ` Daniel Wagner
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=381b003e-3510-8cbf-031d-b5314b17560d@suse.de \
--to=hare@suse.de \
--cc=dwagner@suse.de \
--cc=jsmart2021@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
--cc=shinichiro.kawasaki@wdc.com \
/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