Message ID | 20161020145224.GA2771@localhost.localdomain (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
On 10/20/2016 07:52 AM, Keith Busch wrote: > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c > index ccd9cc5..078530c 100644 > --- a/drivers/nvme/host/core.c > +++ b/drivers/nvme/host/core.c > @@ -201,7 +201,7 @@ static struct nvme_ns *nvme_get_ns_from_disk(struct gendisk *disk) > > void nvme_requeue_req(struct request *req) > { > - blk_mq_requeue_request(req, true); > + blk_mq_requeue_request(req, !blk_mq_queue_stopped(req->q)); > } > EXPORT_SYMBOL_GPL(nvme_requeue_req); Hello Keith, What I had missed while I was preparing my patch series is that the NVMe driver, unlike the dm driver, can call blk_mq_requeue_request() on a stopped queue. So the above patch is needed to keep the current semantics of the NVMe code. I will merge this patch in my patch series. Thanks, Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index ccd9cc5..078530c 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -201,7 +201,7 @@ static struct nvme_ns *nvme_get_ns_from_disk(struct gendisk *disk) void nvme_requeue_req(struct request *req) { - blk_mq_requeue_request(req, true); + blk_mq_requeue_request(req, !blk_mq_queue_stopped(req->q)); } EXPORT_SYMBOL_GPL(nvme_requeue_req); -- --- diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 4b30fa2..a05da98 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -1681,10 +1681,9 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown) del_timer_sync(&dev->watchdog_timer); mutex_lock(&dev->shutdown_lock); - if (pci_is_enabled(to_pci_dev(dev->dev))) { - nvme_stop_queues(&dev->ctrl); + nvme_stop_queues(&dev->ctrl); + if (pci_is_enabled(to_pci_dev(dev->dev))) csts = readl(dev->bar + NVME_REG_CSTS); - } queues = dev->online_queues - 1; for (i = dev->queue_count - 1; i > 0; i--)