nvmet: support for traffic based keep-alive
authorSagi Grimberg <sagi@grimberg.me>
Fri, 2 Nov 2018 17:28:13 +0000 (10:28 -0700)
committerJens Axboe <axboe@kernel.dk>
Sat, 8 Dec 2018 05:26:56 +0000 (22:26 -0700)
commitc09305ae49970e15cd18828c0f78b766e8cf224f
treea6056f345fd79a895cd62e17be2e3e70ea365187
parent6e3ca03ee934572d5de4fb2224c01e12c4d422c8
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>
drivers/nvme/target/admin-cmd.c
drivers/nvme/target/core.c
drivers/nvme/target/nvmet.h