From 5cf86c2cbda7c5140ecca850ff3722c8ed90e622 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Fri, 14 Jan 2022 14:16:22 +0100 Subject: [PATCH] fabrics: Only disconnect discovery controllers during 'connect-all' When calling 'connect-all' the 'persistent' argument only applies to discovery controllers; normal I/O controllers should stay connected, as this was kinda the point... Signed-off-by: Hannes Reinecke --- fabrics.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fabrics.c b/fabrics.c index 2252aa6f..55cc247c 100644 --- a/fabrics.c +++ b/fabrics.c @@ -302,7 +302,8 @@ static int __discover(nvme_ctrl_t c, const struct nvme_fabrics_config *defcfg, __discover(child, defcfg, raw, persistent, true, flags); - if (!persistent) { + if (e->subtype != NVME_NQN_NVME && + !persistent) { nvme_disconnect_ctrl(child); nvme_free_ctrl(child); } -- 2.50.1