[PATCH] fabrics : allow host to create duplicate connections to target
Nilay Shroff
nilay at linux.ibm.com
Wed Apr 3 06:34:16 PDT 2024
Apparently the nvmf connect code doesn't allow creating
duplicate connections from a host to the same target even
though user specifies option "--duplicate-connect" or "-D".
This patch help fix this issue.
Fixes: 07d6b911e081 ("fabrics: Do not attempt to reconnect to already connected ctrls")
Reported-by: Amit Engel <Amit.Engel at Dell.com>
Closes: https://lore.kernel.org/all/CO1PR19MB48850C446CA2FED70F7E5D69EE3D2@CO1PR19MB4885.namprd19.prod.outlook.com/
Signed-off-by: Nilay Shroff <nilay at linux.ibm.com>
---
fabrics.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fabrics.c b/fabrics.c
index 14682907..0f55c617 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -1001,7 +1001,7 @@ int nvmf_connect(const char *desc, int argc, char **argv)
};
c = lookup_ctrl(h, &trcfg);
- if (c && nvme_ctrl_get_name(c)) {
+ if (c && nvme_ctrl_get_name(c) && !cfg.duplicate_connect) {
fprintf(stderr, "already connected\n");
errno = EALREADY;
goto out_free;
--
2.44.0
More information about the Linux-nvme
mailing list