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

Christoph Hellwig hch at lst.de
Thu Feb 23 07:16:54 PST 2017


On Thu, Feb 23, 2017 at 10:21:40AM -0500, Keith Busch wrote:
> I thought this would be non-obvious, so I put this detailed commend just
> before the unfreeze:
> 
> 	/*
> 	 * Waiting for frozen increases the freeze depth. Since we
> 	 * already start the freeze earlier in this function to stop
> 	 * incoming requests, we have to unfreeze after froze to get
> 	 * the depth back to the desired.
> 	 */
> 
> Assuming we are starting with a freeze depth of 0, the nvme_start_freeze
> gets us to 1. Then nvme_wait_freeze increases the freeze depth to 2
> (blk_mq_freeze_wait is not exported),

Oooh.  I didn't spot nvme_wait_freeze did not actually call
blk_mq_freeze_queue_wait.  Let's start by exporting that and beating
some sense into the sequence.



More information about the Linux-nvme mailing list