]> www.infradead.org Git - users/hch/nvme-cli.git/commitdiff
fabrics: write reconnect_delay to fabrics device on connect
authorMartin George <marting@netapp.com>
Mon, 11 May 2020 14:37:15 +0000 (20:07 +0530)
committerKeith Busch <keith.busch@wdc.com>
Thu, 14 May 2020 16:22:16 +0000 (01:22 +0900)
Though '--reconnect-delay' option is defined for connect, it
wasn't passed down to the kernel in connect_ctrl().

Signed-off-by: Martin George <marting@netapp.com>
Signed-off-by: Keith Busch <keith.busch@wdc.com>
fabrics.c

index b3e717fedad1bf8c37605555874ba7ee6eccddb8..18034fa9dd340cb51746f8392139767e586026b5 100644 (file)
--- 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)