summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/target/nvmet.h
diff options
context:
space:
mode:
authorSagi Grimberg <sagi@grimberg.me>2018-11-02 18:28:13 +0100
committerJens Axboe <axboe@kernel.dk>2018-12-08 06:26:56 +0100
commitc09305ae49970e15cd18828c0f78b766e8cf224f (patch)
treea6056f345fd79a895cd62e17be2e3e70ea365187 /drivers/nvme/target/nvmet.h
parentnvme: support traffic based keep-alive (diff)
downloadlinux-c09305ae49970e15cd18828c0f78b766e8cf224f.tar.xz
linux-c09305ae49970e15cd18828c0f78b766e8cf224f.zip
nvmet: support for traffic based keep-alive
A controller that supports traffic based keep-alive can restart the keep alive timer even when no keep-alive was not received in the kato period as long as other admin or I/O commands were received. For each command set ctrl->cmd_seen to true, and when keep-alive timer expires, if any commands were seen, resched ka_work instead of escalating to a fatal error. Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/target/nvmet.h')
-rw-r--r--drivers/nvme/target/nvmet.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nvme/target/nvmet.h b/drivers/nvme/target/nvmet.h
index c2b4d9ee6391..860218edeb6c 100644
--- a/drivers/nvme/target/nvmet.h
+++ b/drivers/nvme/target/nvmet.h
@@ -163,6 +163,8 @@ struct nvmet_ctrl {
struct nvmet_cq **cqs;
struct nvmet_sq **sqs;
+ bool cmd_seen;
+
struct mutex lock;
u64 cap;
u32 cc;