Thread (15 messages) 15 messages, 3 authors, 2021-01-22

Re: [PATCH v3 3/5] nvme-fabrics: avoid double request completion for nvmf_fail_nonready_command

From: Christoph Hellwig <hch@lst.de>
Date: 2021-01-21 09:01:27
Also in: linux-block

On Thu, Jan 21, 2021 at 09:58:37AM +0100, Hannes Reinecke wrote:
On 1/21/21 8:03 AM, Chao Leng wrote:
quoted
When reconnect, the request may be completed with NVME_SC_HOST_PATH_ERROR
in nvmf_fail_nonready_command. The state of request will be changed to
MQ_RQ_IN_FLIGHT before call nvme_complete_rq. If free the request
asynchronously such as in nvme_submit_user_cmd, in extreme scenario
the request may be completed again in tear down process.
nvmf_fail_nonready_command do not need calling blk_mq_start_request
before complete the request. nvmf_fail_nonready_command should set
the state of request to MQ_RQ_COMPLETE before complete the request.
So what you are saying is that there is a race condition between
blk_mq_start_request()
and
nvme_complete_request()
Between those to a teardwon that cancels all requests can come in.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help