From: Daniel Wagner <dwagner@suse.de>
To: linux-nvme@lists.infradead.org
Cc: linux-kernel@vger.kernel.org,
Caleb Sander <csander@purestorage.com>,
Keith Busch <kbusch@kernel.org>, Sagi Grimberg <sagi@grimberg.me>,
Daniel Wagner <dwagner@suse.de>
Subject: [PATCH libnvme v2 2/2] fabrics: Do not pass disable_sqflow if not supported
Date: Tue, 8 Aug 2023 09:09:07 +0200 [thread overview]
Message-ID: <20230808070907.18834-3-dwagner@suse.de> (raw)
In-Reply-To: <20230808070907.18834-1-dwagner@suse.de>
From: Sagi Grimberg <sagi@grimberg.me>
Only retry a connect attempt with disable_sqflow if the kernel
actually supports this option.
Reported-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
src/nvme/fabrics.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/nvme/fabrics.c b/src/nvme/fabrics.c
index 9725eeb3cda8..f0e85d3b766d 100644
--- a/src/nvme/fabrics.c
+++ b/src/nvme/fabrics.c
@@ -1043,7 +1043,8 @@ nvme_ctrl_t nvmf_connect_disc_entry(nvme_host_t h,
if (!ret)
return c;
- if (errno == EINVAL && c->cfg.disable_sqflow) {
+ if (errno == EINVAL && c->cfg.disable_sqflow &&
+ nvmf_check_option(h->r, disable_sqflow)) {
errno = 0;
/* disable_sqflow is unrecognized option on older kernels */
nvme_msg(h->r, LOG_INFO, "failed to connect controller, "
--
2.41.0
next prev parent reply other threads:[~2023-08-08 19:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 7:09 [PATCH libnvme v2 0/2] " Daniel Wagner
2023-08-08 7:09 ` [PATCH libnvme v2 1/2] fabrics: Read the supported options lazy Daniel Wagner
2023-08-08 7:09 ` Daniel Wagner [this message]
2023-08-08 8:47 ` [PATCH libnvme v2 2/2] fabrics: Do not pass disable_sqflow if not supported Sagi Grimberg
2023-08-08 9:09 ` 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=20230808070907.18834-3-dwagner@suse.de \
--to=dwagner@suse.de \
--cc=csander@purestorage.com \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--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
all inboxes | Powered by JetHome®