Skip to contentSkip to conversation

nvme-cli: Revert stop-on-failure with connect-all

PATCH New James Smart 2 participants 4 messages Apr 9, 2019 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme-cli: Revert stop-on-failure with connect-all

The patch that added special treatment for EALREADY connect failures also changed the behavior on what happens if a discovery log contains an entry that is not connectable by the system or host port. If it encounters a log entry that can't be connected to, it will not attempt to connect to any log entries beyond it. This can leave lots of devices unconnected to.

Revert the stop-on-failure introduced by the previous patch.

Specifically, this failed for me on an FC array that had a discovery log entry for a port that was not visible via zoning for the initiator port being used.

Fixes 1a922e0e121d7 ("connect-all: special treatment to EALREADY afetr write to /dev/nvme-fabrics"
Signed-off-by James Smart <jsmart2021 at gmail.com>
CC Eyal Ben David <eyalbe at il.ibm.com>
CC Martin George <Martin.George at netapp.com>
---
 fabrics.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
fabrics.c +6 -3
index 1a9a3fb..511de06 100644
@@ -833,9 +833,12 @@ static int connect_ctrls(struct nvmf_disc_rsp_page_hdr *log, int numrec)
 			continue;
 		}
 
-		/* otherwise error */
-		ret = -instance;
-		break;
+		/*
+		 * don't error out. The Discovery Log may contain
+		 * devices that aren't necessarily connectable via
+		 * the system/host transport port. Let those items
+		 * fail and continue on to the next log element.
+		 */
 	}
 
 	return ret;
Signature · 1 line
2.13.7
maintainer
#1 lore raw

PATCH 1/1 nvme-cli: Revert stop-on-failure with connect-all

Quoted 7 lines · James Smart

The patch that added special treatment for EALREADY connect failures also changed the behavior on what happens if a discovery log contains an entry that is not connectable by the system or host port. If it encounters a log entry that can't be connected to, it will not attempt to connect to any log entries beyond it. This can leave lots of devices unconnected to.

Quoted 5 lines

Revert the stop-on-failure introduced by the previous patch.

Specifically, this failed for me on an FC array that had a discovery log entry for a port that was not visible via zoning for the initiator port being used.

Patch applied. I just tagged a release earlier this week, so let me know if this is urgent enough to warrant a new tag.

#2 lore raw

PATCH 1/1 nvme-cli: Revert stop-on-failure with connect-all

Quoted 8 lines · Keith Busch
Quoted 7 lines · James Smart

The patch that added special treatment for EALREADY connect failures also changed the behavior on what happens if a discovery log contains an entry that is not connectable by the system or host port. If it encounters a log entry that can't be connected to, it will not attempt to connect to any log entries beyond it. This can leave lots of devices unconnected to.

Quoted 9 lines
Quoted 5 lines

Revert the stop-on-failure introduced by the previous patch.

Specifically, this failed for me on an FC array that had a discovery log entry for a port that was not visible via zoning for the initiator port being used.

Patch applied. I just tagged a release earlier this week, so let me know if this is urgent enough to warrant a new tag.

I believe it is unfortunately. It seems to be a fairly common thing.

-- james

maintainer
#3 lore raw

PATCH 1/1 nvme-cli: Revert stop-on-failure with connect-all

Quoted 6 lines · James Smart
Quoted 3 lines · Keith Busch

Patch applied. I just tagged a release earlier this week, so let me know if this is urgent enough to warrant a new tag.

I believe it is unfortunately. It seems to be a fairly common thing.

Okay, done. There were only 2 other commits fixing trivial bugs since the last release, so just tagged it with an additional minor number.