linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nvme-cli: remove default ctrl_loss_tmo for connect
@ 2020-10-23 20:25 Chaitanya Kulkarni
  2020-10-23 21:13 ` Sagi Grimberg
  2020-10-23 21:16 ` Sagi Grimberg
  0 siblings, 2 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2020-10-23 20:25 UTC (permalink / raw)
  To: linux-nvme; +Cc: kbusch, sagi, Chaitanya Kulkarni

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@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


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] nvme-cli: remove default ctrl_loss_tmo for connect
  2020-10-23 20:25 [PATCH] nvme-cli: remove default ctrl_loss_tmo for connect Chaitanya Kulkarni
@ 2020-10-23 21:13 ` Sagi Grimberg
  2020-10-23 21:16 ` Sagi Grimberg
  1 sibling, 0 replies; 4+ messages in thread
From: Sagi Grimberg @ 2020-10-23 21:13 UTC (permalink / raw)
  To: Chaitanya Kulkarni, linux-nvme; +Cc: kbusch


> 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.

Please CC the patch author that made ctrl_loss_tmo to be passed
by default, the patch description provided does not specify
a good reason why the patch was given.

Also, please add a Fixes: tag.

--
commit 4b607779af71d23bc5ff7fcc14a7e1fde8507ed7
Author: Aleksei Marov <alekseymmm@mail.ru>
Date:   Fri Jun 19 18:10:07 2020 +0300

     Allow 0 value of ctrl_loss_tmo.
--

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] nvme-cli: remove default ctrl_loss_tmo for connect
  2020-10-23 20:25 [PATCH] nvme-cli: remove default ctrl_loss_tmo for connect Chaitanya Kulkarni
  2020-10-23 21:13 ` Sagi Grimberg
@ 2020-10-23 21:16 ` Sagi Grimberg
  2020-10-26 21:02   ` Chaitanya Kulkarni
  1 sibling, 1 reply; 4+ messages in thread
From: Sagi Grimberg @ 2020-10-23 21:16 UTC (permalink / raw)
  To: Chaitanya Kulkarni, linux-nvme; +Cc: kbusch


> 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) ||

You just removed the entire option altogether? the user can no longer
pass ctrl_loss_tmo now. You should instead disallow zero back (i.e.
revert the offending patch that made it as such) and figure out
a proper way to allow ctrl_loss_tmo=0 functionality.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] nvme-cli: remove default ctrl_loss_tmo for connect
  2020-10-23 21:16 ` Sagi Grimberg
@ 2020-10-26 21:02   ` Chaitanya Kulkarni
  0 siblings, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2020-10-26 21:02 UTC (permalink / raw)
  To: Sagi Grimberg, linux-nvme; +Cc: kbusch

On 10/23/20 14:16, Sagi Grimberg wrote:
>> 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) ||
> You just removed the entire option altogether? the user can no longer
> pass ctrl_loss_tmo now. You should instead disallow zero back (i.e.
> revert the offending patch that made it as such) and figure out
> a proper way to allow ctrl_loss_tmo=0 functionality.
>
Thanks for the comments will send out the V2.


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-26 21:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-23 20:25 [PATCH] nvme-cli: remove default ctrl_loss_tmo for connect Chaitanya Kulkarni
2020-10-23 21:13 ` Sagi Grimberg
2020-10-23 21:16 ` Sagi Grimberg
2020-10-26 21:02   ` Chaitanya Kulkarni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).