[PATCH 5/6] nvme-rdma: fix timeout handler
Sagi Grimberg
sagi at grimberg.me
Mon Aug 3 11:03:12 EDT 2020
>> @@ -1946,6 +1947,22 @@ static int nvme_rdma_cm_handler(struct
>> rdma_cm_id *cm_id,
>> return 0;
>> }
>> +static void nvme_rdma_complete_timed_out(struct request *rq)
>> +{
>> + struct nvme_rdma_request *req = blk_mq_rq_to_pdu(rq);
>> + struct nvme_rdma_queue *queue = req->queue;
>> + struct nvme_rdma_ctrl *ctrl = queue->ctrl;
>> +
>> + /* fence other contexts that may complete the command */
>> + flush_work(&ctrl->err_work);
>> + nvme_rdma_stop_queue(queue);
> There maybe concurrent with error recovery, may cause abnormal because
> nvme_rdma_stop_queue will return but the queue is not stoped,
> maybe is stopping by the error recovery.
err_work flush used to fence, once we did queue stop, it should be safe
to complete the command from the timeout handler.
More information about the Linux-nvme
mailing list