[PATCH] nvmet: Set ctrl->kato to a default NVMET_DISC_KATO value

Engel, Amit Amit.Engel at Dell.com
Tue Sep 15 03:00:10 EDT 2020


Agree. I will send a patch soon

-----Original Message-----
From: Christoph Hellwig <hch at lst.de> 
Sent: Tuesday, September 15, 2020 9:44 AM
To: Sagi Grimberg
Cc: Engel, Amit; Christoph Hellwig; linux-nvme at lists.infradead.org
Subject: Re: [PATCH] nvmet: Set ctrl->kato to a default NVMET_DISC_KATO value


[EXTERNAL EMAIL] 

On Mon, Sep 14, 2020 at 04:53:47PM -0700, Sagi Grimberg wrote:
>
>> Hi Sagi,
>> Still dealing with keep-alive timeout  zero value and how it affects other scenarios:
>> With my latest patch, when keep alive timeout is set to zero the 
>> keep-alive timer is disabled. (Upstream commit 
>> 0d3b6a8d213a30387b5104b2fb25376d18636f23)
>> But that’s only part of the picture,
>> What happens if a user starts with kato > 0 and modifying it by set feature a while after?
>> After modifying the kato to 0 with a set features we will never stop 
>> the timer In a similar way, when starting with kato 0 and then modify 
>> to kato > 0 we will never start the timer
>>
>> We thought about solve it by adding checks in ‘nvmet_set_feat_kato’ 
>> for the above cases And handle the ka_work accordingly What do you 
>> think ?
>
> We can probably just cancel and restart the keep alive timer in that 
> case..

Yes, the Set Features handler should:

 (1) cancel the timer
 (2) update it to the new value
 (3) start the timer again (nvmet_start_keep_alive_timer will handle
     the kato == 0 case)


More information about the Linux-nvme mailing list