mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
nvmet-rdma: drain the queue-pair just before freeing it
draining the qp right after disconnect might not suffice because the nvmet sq is not fully drained (in nvmet_sq_destroy) and we might see completions after the drain. Instead, drain right before the qp destroy which comes after the sq destruction and we can be sure that no posts come after the drain. Tested-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
This commit is contained in:
parent
c8dbc37cd8
commit
14c862dbb0
1 changed files with 1 additions and 1 deletions
|
@ -951,6 +951,7 @@ static int nvmet_rdma_create_queue_ib(struct nvmet_rdma_queue *queue)
|
|||
|
||||
static void nvmet_rdma_destroy_queue_ib(struct nvmet_rdma_queue *queue)
|
||||
{
|
||||
ib_drain_qp(queue->cm_id->qp);
|
||||
rdma_destroy_qp(queue->cm_id);
|
||||
ib_free_cq(queue->cq);
|
||||
}
|
||||
|
@ -1245,7 +1246,6 @@ static void __nvmet_rdma_queue_disconnect(struct nvmet_rdma_queue *queue)
|
|||
|
||||
if (disconnect) {
|
||||
rdma_disconnect(queue->cm_id);
|
||||
ib_drain_qp(queue->cm_id->qp);
|
||||
schedule_work(&queue->release_work);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue