From: Johannes Thumshirn Date: Thu, 9 Aug 2018 09:25:22 +0000 (+0200) Subject: fabrics: write ctrl_loss_tmo to fabrics device on connect X-Git-Tag: v1.7~107 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2db885e79033032b61baad626db066387c490148;p=users%2Fsagi%2Fnvme-cli.git fabrics: write ctrl_loss_tmo to fabrics device on connect Commit 388c9dbe86be ("fabrics: add ctrl-loss-tmo to connect-all") introduced the '--ctrl-loss-tmo' option for the connect-all command, but we forgor to pass down the option to the kernel in connect_ctrl(). Signed-off-by: Johannes Thumshirn Fixes: 388c9dbe86be ("fabrics: add ctrl-loss-tmo to connect-all") fixup! fabrics: write ctrl_loss_tmo to fabrics device on connect Signed-off-by: Keith Busch --- diff --git a/fabrics.c b/fabrics.c index 8437e323..241d8b86 100644 --- a/fabrics.c +++ b/fabrics.c @@ -621,6 +621,12 @@ static int connect_ctrl(struct nvmf_disc_rsp_page_entry *e) p+= len; } + if (cfg.ctrl_loss_tmo) { + len = sprintf(p, ",ctrl_loss_tmo=%s", cfg.ctrl_loss_tmo); + if (len < 0) + return -EINVAL; + p += len; + } switch (e->trtype) { case NVMF_TRTYPE_LOOP: /* loop */