[PATCH 6/9] nvme: abort requests on the reqeueue list when shutting down a controller
Christoph Hellwig
hch at lst.de
Thu Oct 22 05:03:38 PDT 2015
Otherwise we might never complete them as nvme_clear_queue won't find these
requests.
Signed-off-by: Christoph Hellwig <hch at lst.de>
---
drivers/nvme/host/pci.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index fb44100..73d015d 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2116,11 +2116,15 @@ static void nvme_unfreeze_queues(struct nvme_dev *dev)
static void nvme_dev_shutdown(struct nvme_dev *dev)
{
+ struct nvme_ns *ns;
int i;
u32 csts = -1;
nvme_dev_list_remove(dev);
+ list_for_each_entry(ns, &dev->ctrl.namespaces, list)
+ blk_mq_abort_requeue_list(ns->queue);
+
if (dev->bar) {
nvme_freeze_queues(dev);
csts = readl(dev->bar + NVME_REG_CSTS);
--
1.9.1
More information about the Linux-nvme
mailing list