nvme-pci: fix queue unquiesce check on slot_reset
PATCH 1/1 nvme-pci: fix queue unquiesce check on slot_reset
From: Keith Busch <[email protected]>
A zero return means the reset was successfully scheduled. We don't want to unquiesce the queues while the reset_work is pending, as that will just flush out requeued requests to a failed completion.
--- drivers/nvme/host/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/pci.c +1 -1
@@ -3575,7 +3575,7 @@ static pci_ers_result_t nvme_slot_reset(struct pci_dev *pdev)dev_info (dev->ctrl.device,"restart after slot reset\n" );pci_restore_state (pdev); -if (!nvme_try_sched_reset (&dev->ctrl)) +if (nvme_try_sched_reset (&dev->ctrl))nvme_unquiesce_io_queues (&dev->ctrl);return PCI_ERS_RESULT_RECOVERED ; }
Signature · 1 line
2.47.1
Christoph Hellwig
maintainerQuoted 7 lines · Keith Busch
From: Keith Busch <[email protected]>
A zero return means the reset was successfully scheduled. We don't want to unquiesce the queues while the
reset_workis pending, as that will just flush out requeued requests to a failed completion.Fixes 71a5bb153be104 ("nvme: ensure disabling pairs with unquiesce")
Sounds like this code path isn't get teste all the much if this stuck around for so long..
Keith Busch
maintainerQuoted 11 lines · Christoph Hellwig
Quoted 7 lines · Keith Busch
From: Keith Busch <[email protected]>
A zero return means the reset was successfully scheduled. We don't want to unquiesce the queues while the
reset_workis pending, as that will just flush out requeued requests to a failed completion.Fixes 71a5bb153be104 ("nvme: ensure disabling pairs with unquiesce")Sounds like this code path isn't get teste all the much if this stuck around for so long..
The conditions that trigger pcie errors were the primary concern. Of course you'll get IO errors, right? The pcie connection is flakey! But we are supposed retry IO's after recovery, which we weren't doing, and that was a secondary concern I embaressingly overlooked for many reports.
Keith Busch
maintainerQuoted 10 lines · Keith Busch
Quoted 9 lines · Christoph Hellwig
Quoted 7 lines · Keith Busch
From: Keith Busch <[email protected]>
A zero return means the reset was successfully scheduled. We don't want to unquiesce the queues while the
reset_workis pending, as that will just flush out requeued requests to a failed completion.Fixes 71a5bb153be104 ("nvme: ensure disabling pairs with unquiesce")
Quoted 8 lines
Quoted 2 lines
Sounds like this code path isn't get teste all the much if this stuck around for so long..
The conditions that trigger pcie errors were the primary concern. Of course you'll get IO errors, right? The pcie connection is flakey! But we are supposed retry IO's after recovery, which we weren't doing, and that was a secondary concern I embaressingly overlooked for many reports.
We can still take this right? It is a good fix, even if we misunderstood why IO was failing for over a year there.
Christoph Hellwig
maintainerQuoted 10 lines · Keith Busch
Quoted 8 lines
Quoted 2 lines
Sounds like this code path isn't get teste all the much if this stuck around for so long..
The conditions that trigger pcie errors were the primary concern. Of course you'll get IO errors, right? The pcie connection is flakey! But we are supposed retry IO's after recovery, which we weren't doing, and that was a secondary concern I embaressingly overlooked for many reports.
We can still take this right?
Absolutely. Just wondering how this managed to slip through.
Christoph Hellwig
maintainerThanks,
added to nvme-6.15.