Commit 1c584208 authored by Keith Busch's avatar Keith Busch Committed by Christoph Hellwig

nvme-pci: fix timeout request state check

Polling the completion can progress the request state to IDLE, either
inline with the completion, or through softirq. Either way, the state
may not be COMPLETED, so don't check for that. We only care if the state
isn't IN_FLIGHT.

This is fixing an issue where the driver aborts an IO that we just
completed. Seeing the "aborting" message instead of "polled" is very
misleading as to where the timeout problem resides.

Fixes: bf392a5d ("nvme-pci: Remove tag from process cq")
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent c0a4a1ea
...@@ -1362,7 +1362,7 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req) ...@@ -1362,7 +1362,7 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req)
else else
nvme_poll_irqdisable(nvmeq); nvme_poll_irqdisable(nvmeq);
if (blk_mq_request_completed(req)) { if (blk_mq_rq_state(req) != MQ_RQ_IN_FLIGHT) {
dev_warn(dev->ctrl.device, dev_warn(dev->ctrl.device,
"I/O %d QID %d timeout, completion polled\n", "I/O %d QID %d timeout, completion polled\n",
req->tag, nvmeq->qid); req->tag, nvmeq->qid);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment