diff options
author | Sagi Grimberg <sagi@grimberg.me> | 2017-05-04 12:33:11 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-06-15 14:28:21 +0200 |
commit | b282a88d910296facf89fd1088832f9b41fa00c5 (patch) | |
tree | f64c6462934fd57d5c004687c060796a7fdb4cf0 /drivers | |
parent | nvme-rdma: rework rdma connection establishment error path (diff) | |
download | linux-b282a88d910296facf89fd1088832f9b41fa00c5.tar.xz linux-b282a88d910296facf89fd1088832f9b41fa00c5.zip |
nvme-rdma: Get rid of CONNECTED state
We only care about if the queue is LIVE for request submission,
so no need for CONNECTED.
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/nvme/host/rdma.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index aea78d67f8be..17dddaf4ca3f 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -80,9 +80,8 @@ struct nvme_rdma_request { }; enum nvme_rdma_queue_flags { - NVME_RDMA_Q_CONNECTED = 0, + NVME_RDMA_Q_LIVE = 0, NVME_RDMA_Q_DELETING = 1, - NVME_RDMA_Q_LIVE = 2, }; struct nvme_rdma_queue { @@ -580,7 +579,6 @@ static int nvme_rdma_init_queue(struct nvme_rdma_ctrl *ctrl, } clear_bit(NVME_RDMA_Q_DELETING, &queue->flags); - set_bit(NVME_RDMA_Q_CONNECTED, &queue->flags); return 0; @@ -798,10 +796,8 @@ static void nvme_rdma_error_recovery_work(struct work_struct *work) nvme_stop_keep_alive(&ctrl->ctrl); - for (i = 0; i < ctrl->queue_count; i++) { - clear_bit(NVME_RDMA_Q_CONNECTED, &ctrl->queues[i].flags); + for (i = 0; i < ctrl->queue_count; i++) clear_bit(NVME_RDMA_Q_LIVE, &ctrl->queues[i].flags); - } if (ctrl->queue_count > 1) nvme_stop_queues(&ctrl->ctrl); @@ -1659,7 +1655,7 @@ static void nvme_rdma_shutdown_ctrl(struct nvme_rdma_ctrl *ctrl) nvme_rdma_free_io_queues(ctrl); } - if (test_bit(NVME_RDMA_Q_CONNECTED, &ctrl->queues[0].flags)) + if (test_bit(NVME_RDMA_Q_LIVE, &ctrl->queues[0].flags)) nvme_shutdown_ctrl(&ctrl->ctrl); blk_mq_stop_hw_queues(ctrl->ctrl.admin_q); |