diff options
author | Sagi Grimberg <sagi@grimberg.me> | 2017-07-10 09:22:35 +0300 |
---|---|---|
committer | Sagi Grimberg <sagi@grimberg.me> | 2017-08-28 23:00:33 +0300 |
commit | 148b4e7ff31e4bb90cf7851ad1bcd305c292be2c (patch) | |
tree | 4b3eedc775be66323bfdea3940b970eb29b08667 /drivers/nvme | |
parent | a57bd54122232b32414748fc8b14634bfd74a7ff (diff) | |
download | linux-stable-148b4e7ff31e4bb90cf7851ad1bcd305c292be2c.tar.gz linux-stable-148b4e7ff31e4bb90cf7851ad1bcd305c292be2c.tar.bz2 linux-stable-148b4e7ff31e4bb90cf7851ad1bcd305c292be2c.zip |
nvme-rdma: stop queues instead of simply flipping their state
If we move the queues from LIVE state, we might as well stop them (drain
for rdma). Do it after we stop the request queues to prevent a stray
request sneaking in .queue_rq after we stop the queue.
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/rdma.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index b5fdd2b009c0..34d3ed8b249e 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -945,16 +945,15 @@ 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); - int i; nvme_stop_ctrl(&ctrl->ctrl); - for (i = 0; i < ctrl->ctrl.queue_count; i++) - clear_bit(NVME_RDMA_Q_LIVE, &ctrl->queues[i].flags); - - if (ctrl->ctrl.queue_count > 1) + if (ctrl->ctrl.queue_count > 1) { nvme_stop_queues(&ctrl->ctrl); + nvme_rdma_stop_io_queues(ctrl); + } blk_mq_quiesce_queue(ctrl->ctrl.admin_q); + nvme_rdma_stop_queue(&ctrl->queues[0]); /* We must take care of fastfail/requeue all our inflight requests */ if (ctrl->ctrl.queue_count > 1) |