diff options
author | Sagi Grimberg <sagi@grimberg.me> | 2022-11-13 12:24:24 +0100 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2022-11-16 08:36:37 +0100 |
commit | 91c11d5f32547a08d462934246488fe72f3d44c3 (patch) | |
tree | 607bb8c43b9ca688d899a51c3edf1355fea49742 /drivers/nvme/host/rdma.c | |
parent | nvme-tcp: stop auth work after tearing down queues in error recovery (diff) | |
download | linux-91c11d5f32547a08d462934246488fe72f3d44c3.tar.xz linux-91c11d5f32547a08d462934246488fe72f3d44c3.zip |
nvme-rdma: stop auth work after tearing down queues in error recovery
when starting error recovery there might be a authentication work
running, and it involves I/O commands. Given the controller is tearing
down there is no chance for the I/O to complete other than timing out
which may unnecessarily take a full io timeout.
So first tear down the queues, fail/cancel all inflight I/O (including
potentially authentication) and only then stop authentication. This
ensures that failover is not stalled due to blocked authentication I/O.
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/host/rdma.c')
-rw-r--r-- | drivers/nvme/host/rdma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index ccd45e5b3298..3d78278e47c5 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -1153,13 +1153,13 @@ static void nvme_rdma_error_recovery_work(struct work_struct *work) struct nvme_rdma_ctrl *ctrl = container_of(work, struct nvme_rdma_ctrl, err_work); - nvme_auth_stop(&ctrl->ctrl); nvme_stop_keep_alive(&ctrl->ctrl); flush_work(&ctrl->ctrl.async_event_work); nvme_rdma_teardown_io_queues(ctrl, false); nvme_start_queues(&ctrl->ctrl); nvme_rdma_teardown_admin_queue(ctrl, false); nvme_start_admin_queue(&ctrl->ctrl); + nvme_auth_stop(&ctrl->ctrl); if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING)) { /* state change failure is ok if we started ctrl delete */ |