Skip to content

Commit 5bd69d2

Browse files
keithbuschgregkh
authored andcommitted
nvme-pci: fix timeout request state check
[ Upstream commit 1c58420 ] 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]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 39178df commit 5bd69d2

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
@@ -1280,7 +1280,7 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
12801280
else
12811281
nvme_poll_irqdisable(nvmeq);
12821282

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

0 commit comments

Comments
 (0)