[PATCH] nvme-cli: remove default ctrl_loss_tmo for connect

Chaitanya Kulkarni chaitanya.kulkarni at wdc.com
Fri Oct 23 16:25:21 EDT 2020


Since nvme-cli adds a default ctrl_loss_tmo for connect command
all the testcases in the blktests are failing. Thjs addition of
the parameter breaks the nvme-cli command-line compatibility with older
versions.

Remove the default ctrl loss tmo parameter addition for the connect
command user can specify that from the command line.

Without this patch :-

# ./check tests/nvme/008
nvme/008 (create an NVMeOF host with a block device-backed ns) [failed]
    runtime  0.157s  ...  0.165s
    --- tests/nvme/008.out	2019-09-13 21:45:10.353000000 -0700
    +++ /root/blktests/results/nodev/nvme/008.out.bad	2020-10-23 10:08:16.910000000 -0700
    @@ -1,5 +1,7 @@
     Running nvme/008
    -91fdba0d-f87b-4c25-b80f-db7be1418b9e
    -uuid.91fdba0d-f87b-4c25-b80f-db7be1418b9e
    -NQN:blktests-subsystem-1 disconnected 1 controller(s)
    +Failed to write to /dev/nvme-fabrics: Invalid argument
    +cat: /sys/class/nvme/nvme*/subsysnqn: No such file or directory
    +cat: /sys/block/n1/uuid: No such file or directory
    ...
    (Run 'diff -u tests/nvme/008.out /root/blktests/results/nodev/nvme/008.out.bad' to see the entire diff)

With this patch :-

# ./check tests/nvme/008
nvme/008 (create an NVMeOF host with a block device-backed ns) [passed]
    runtime  0.165s  ...  2.857s


Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
---
 fabrics.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fabrics.c b/fabrics.c
index f8a055b..9c33c02 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -896,8 +896,6 @@ static int build_options(char *argstr, int max_len, bool discover)
 				cfg.keep_alive_tmo, false)) ||
 	    add_int_argument(&argstr, &max_len, "reconnect_delay",
 				cfg.reconnect_delay, false) ||
-	    add_int_argument(&argstr, &max_len, "ctrl_loss_tmo",
-				cfg.ctrl_loss_tmo, true) ||
 	    add_int_argument(&argstr, &max_len, "tos",
 				cfg.tos, true) ||
 	    add_bool_argument(&argstr, &max_len, "duplicate_connect",
-- 
2.22.1




More information about the Linux-nvme mailing list