[PATCH 1/2] nvmet: reset keep alive timer in controller enable

James Smart james.smart at broadcom.com
Mon Apr 16 09:45:02 PDT 2018


On 4/15/2018 1:47 AM, Sagi Grimberg wrote:
> From: Max Gurtuvoy <maxg at mellanox.com>
>
> Controllers that are not yet enabled should not really
> enforce keep alive timeout, but we still want to track
> a timeout and cleanup in case a host died before it enabled
> us. Hence, simply reset the keep alive timer when the controller
> is enabled.
>
> Suggested-by: Max Gurtuvoy <maxg at mellanox.com>
> Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
> ---
>   drivers/nvme/target/core.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
> index fe151d672241..a81bf4d5e60c 100644
> --- a/drivers/nvme/target/core.c
> +++ b/drivers/nvme/target/core.c
> @@ -643,6 +643,7 @@ static void nvmet_start_ctrl(struct nvmet_ctrl *ctrl)
>   	}
>   
>   	ctrl->csts = NVME_CSTS_RDY;
> +	mod_delayed_work(system_wq, &ctrl->ka_work, ctrl->kato * HZ);
>   }
>   
>   static void nvmet_clear_ctrl(struct n

Signed-off-by:  James Smart <james.smart at broadcom.com>
> vmet_ctrl *ctrl)




More information about the Linux-nvme mailing list