File 0006-fabrics-write-reconnect_delay-to-fabrics-device-on-c.patch of Package nvme-cli.22025

From: Martin George <marting@netapp.com>
Date: Mon, 11 May 2020 20:07:15 +0530
Subject: [PATCH] fabrics: write reconnect_delay to fabrics device on connect


Though '--reconnect-delay' option is defined for connect, it
wasn't passed down to the kernel in connect_ctrl().

Git-commit: b2a0aba1176aa26f2b5ce0c0360c4be67dff63d8
References: bsc#1172111
Signed-off-by: Martin George <marting@netapp.com>
Signed-off-by: Keith Busch <keith.busch@wdc.com>
---
 fabrics.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/fabrics.c b/fabrics.c
index b3e717f..18034fa 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -995,6 +995,13 @@ retry:
 		p+= len;
 	}
 
+	if (cfg.reconnect_delay) {
+		len = sprintf(p, ",reconnect_delay=%d", cfg.reconnect_delay);
+		if (len < 0)
+			return -EINVAL;
+		p += len;
+	}
+
 	if (cfg.ctrl_loss_tmo) {
 		len = sprintf(p, ",ctrl_loss_tmo=%d", cfg.ctrl_loss_tmo);
 		if (len < 0)
-- 
2.16.4

openSUSE Build Service is sponsored by