[PATCHv2] nvme-pci: fix timeout request state check
Christoph Hellwig
hch at lst.de
Tue Jan 17 21:33:06 PST 2023
On Tue, Jan 17, 2023 at 09:22:44PM -0800, Keith Busch wrote:
> From: Keith Busch <kbusch at kernel.org>
>
> 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 STARTED.
>
> 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.
Hmm. Using a started helper for something that by definition is started
doesn't really make much sense. I guess the problem here is that
blk_mq_end_request_batch sets the state to MQ_RQ_IDLE afte calling
blk_complete_request? Maybe we just need an explicit check for
MQ_RQ_IDLE here as started seems like the wrong implication here.
More information about the Linux-nvme
mailing list