All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] nvmet: reset keep alive timer in controller enable
@ 2018-04-15  8:47 Sagi Grimberg
  2018-04-15  8:47 ` [PATCH 2/2] nvme: start keep alive timer when enabling the controller Sagi Grimberg
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Sagi Grimberg @ 2018-04-15  8:47 UTC (permalink / raw)


From: Max Gurtuvoy <maxg@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 nvmet_ctrl *ctrl)
-- 
2.14.1

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

end of thread, other threads:[~2018-06-19  5:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-15  8:47 [PATCH 1/2] nvmet: reset keep alive timer in controller enable Sagi Grimberg
2018-04-15  8:47 ` [PATCH 2/2] nvme: start keep alive timer when enabling the controller Sagi Grimberg
2018-04-15  9:23   ` Max Gurtovoy
2018-04-15 10:17     ` Sagi Grimberg
2018-04-17 15:24       ` Christoph Hellwig
2018-04-23 10:08         ` Max Gurtovoy
2018-04-29 12:11           ` [Suspected-Phishing]Re: " Max Gurtovoy
2018-06-17 10:26         ` Max Gurtovoy
2018-06-19  5:42           ` Christoph Hellwig
2018-04-16 16:45   ` James Smart
2018-04-16 16:45 ` [PATCH 1/2] nvmet: reset keep alive timer in controller enable James Smart
2018-04-17 15:24 ` Christoph Hellwig
2018-04-22 14:26   ` Max Gurtovoy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.