[PATCH 1/2 V2] nvme-rdma: Fix race between queue timeout and error recovery

Israel Rukshin israelr at mellanox.com
Sun Apr 8 09:16:59 PDT 2018


On 4/8/2018 6:26 PM, Sagi Grimberg wrote:
>
>> When returning BLK_EH_HANDLED from nvme_rdma_timeout() the block layer
>> complete the request.
>> Error recovery may also complete the request when aborting the requests.
>>
>
> This is still not a sufficient change log.
>
> You need to describe why is this being done vs. invalidating the rkey
> in the timeout handler. And what does "may also" mean?
>
> Second, isn't the double completion protected by the request gstate?

It is protected if you use only blk_mq_complete_request() and not 
__blk_mq_complete_request().
You can see that blk_mq_rq_timed_out()  calls directly to 
__blk_mq_complete_request() if the timeout
function returns BLK_EH_HANDLED.



More information about the Linux-nvme mailing list