Thread (7 messages) 7 messages, 3 authors, 2018-08-14
STALE2897d

[PATCH nvme-cli 2/2] fabrics: write keep-alive-timeout to fabrics device on connect

From: Johannes Thumshirn <hidden>
Date: 2018-08-08 07:10:32
Subsystem: the rest · Maintainer: Linus Torvalds

Commit 7099227b07a8 ("fabrics: add option to supply keep-alive-timeout
for connect-all") introduced a keep-alive-timeout option for
connect-all but forgot to write it down to the kernel's fabrics
device in connect_ctrl().

Pass down the keep-alove-timeouts if we're connecting to a non
discovery controller.

Signed-off-by: Johannes Thumshirn <jthumshirn at suse.de>
Fixes: 7099227b07a8 ("fabrics: add option to supply keep-alive-timeout for connect-all")
---
 fabrics.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/fabrics.c b/fabrics.c
index baff94ae865c..c0e50d148eb4 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -628,6 +628,13 @@ static int connect_ctrl(struct nvmf_disc_rsp_page_entry *e)
 		p+= len;
 	}
 
+	if (cfg.keep_alive_tmo && !discover) {
+		len = sprintf(p, ",keep_alive_tmo=%s", cfg.keep_alive_tmo);
+		if (len < 0)
+			return -EINVAL;
+		p += len;
+	}
+
 	switch (e->trtype) {
 	case NVMF_TRTYPE_LOOP: /* loop */
 		len = sprintf(p, ",transport=loop");
-- 
2.16.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help