[PATCH 5/5] nvme/pci: Complete all stuck requests

Christoph Hellwig hch at lst.de
Thu Feb 23 07:06:51 PST 2017


On Wed, Feb 22, 2017 at 09:45:11AM -0500, Keith Busch wrote:
> > with your five patches applied and there is no suspend argument anywhere
> > in pci.c.
> 
> Err, I meant 'shutdown == true' for nvme_dev_disable, not suspend. That's
> in the nvme tree. The part that isn't is the tree is the 'was_suspend' in
> nvme_reset_work. That was part of the opal series directly in Jens' tree.

I still don't understand it.  nvme_dev_disable has no early return,
and it does the nvme_start_freeze, nvme_wait_freeze and nvme_unfreeze
calls under exactly the same conditionals:

	if (drain_queue) {
		if (shutdown)
			nvme_start_freeze(&dev->ctrl);
		nvme_stop_queues(&dev->ctrl);
		...
	}

	..

	if (drain_queue && shutdown) {
		nvme_start_queues(&dev->ctrl);
		nvme_wait_freeze(&dev->ctrl);
		nvme_unfreeze(&dev->ctrl);
		nvme_stop_queues(&dev->ctrl);
	}

so where is the pairing for the unfreeze in nvme_reset_work
coming from?



More information about the Linux-nvme mailing list