Skip to content

Commit 1c58420

Browse files
keithbuschChristoph Hellwig
authored andcommitted
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: bf392a5 ("nvme-pci: Remove tag from process cq") Signed-off-by: Keith Busch <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent c0a4a1e commit 1c58420

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvme/host/pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req)
13621362
else
13631363
nvme_poll_irqdisable(nvmeq);
13641364

1365-
if (blk_mq_request_completed(req)) {
1365+
if (blk_mq_rq_state(req) != MQ_RQ_IN_FLIGHT) {
13661366
dev_warn(dev->ctrl.device,
13671367
"I/O %d QID %d timeout, completion polled\n",
13681368
req->tag, nvmeq->qid);

0 commit comments

Comments
 (0)