diff options
author | Amit Engel <amit.engel@dell.com> | 2020-09-16 20:47:20 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-09-27 09:14:19 +0200 |
commit | 4e683c48db018e72e81e1e0d12a5020d29be561a (patch) | |
tree | 45fd33a1f9b194a8b47cb293b0f8dbec9bffa880 /drivers/nvme/target/nvmet.h | |
parent | f7790e5de92a3b88e74704a6cb2276c09c32f511 (diff) | |
download | lwn-4e683c48db018e72e81e1e0d12a5020d29be561a.tar.gz lwn-4e683c48db018e72e81e1e0d12a5020d29be561a.zip |
nvmet: handle keep-alive timer when kato is modified by a set features cmd
A user may modify the kato by a set features cmd. To properly deal
with races or a kato value of 0 (no keep alive enabled) change
nvmet_set_feat_kato to first disable the timer, then set the value
and then re-enable the timer.
Signed-off-by: Amit Engel <amit.engel@dell.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/target/nvmet.h')
-rw-r--r-- | drivers/nvme/target/nvmet.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nvme/target/nvmet.h b/drivers/nvme/target/nvmet.h index 47ee3fb193bd..559a15ccc322 100644 --- a/drivers/nvme/target/nvmet.h +++ b/drivers/nvme/target/nvmet.h @@ -395,6 +395,8 @@ void nvmet_get_feat_async_event(struct nvmet_req *req); u16 nvmet_set_feat_kato(struct nvmet_req *req); u16 nvmet_set_feat_async_event(struct nvmet_req *req, u32 mask); void nvmet_execute_async_event(struct nvmet_req *req); +void nvmet_start_keep_alive_timer(struct nvmet_ctrl *ctrl); +void nvmet_stop_keep_alive_timer(struct nvmet_ctrl *ctrl); u16 nvmet_parse_connect_cmd(struct nvmet_req *req); void nvmet_bdev_set_limits(struct block_device *bdev, struct nvme_id_ns *id); |