mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
nvmet: reset keep alive timer in controller enable
Controllers that are not yet enabled should not really enforce keep alive timeouts, but we still want to track a timeout and cleanup in case a host died before it enabled the controller. Hence, simply reset the keep alive timer when the controller is enabled. Suggested-by: Max Gurtovoy <[email protected]> Signed-off-by: Sagi Grimberg <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
This commit is contained in:
parent
5e77d61cbc
commit
d68a90e148
1 changed files with 8 additions and 0 deletions
|
|
@ -686,6 +686,14 @@ static void nvmet_start_ctrl(struct nvmet_ctrl *ctrl)
|
|||
}
|
||||
|
||||
ctrl->csts = NVME_CSTS_RDY;
|
||||
|
||||
/*
|
||||
* Controllers that are not yet enabled should not really enforce the
|
||||
* keep alive timeout, but we still want to track a timeout and cleanup
|
||||
* in case a host died before it enabled the controller. Hence, simply
|
||||
* reset the keep alive timer when the controller is enabled.
|
||||
*/
|
||||
mod_delayed_work(system_wq, &ctrl->ka_work, ctrl->kato * HZ);
|
||||
}
|
||||
|
||||
static void nvmet_clear_ctrl(struct nvmet_ctrl *ctrl)
|
||||
|
|
|
|||
Loading…
Reference in a new issue