[PATCH 2/5] nvme: Ending failed unstarted requests

Sagi Grimberg sagi at grimberg.me
Tue Jan 23 05:07:14 PST 2018


> Hi Keith
> 
> On 01/23/2018 05:56 AM, Keith Busch wrote:
>>   	nvme_cancel_requests(&dev->ctrl);
>>   	/*
>>   	 * The driver will not be starting up queues again if shutting down so
>> -	 * must flush all entered requests to their failed completion to avoid
>> +	 * must end all entered requests to their failed completion to avoid
>>   	 * deadlocking blk-mq hot-cpu notifier.
>>   	 */
>>   	if (shutdown)
>> -		nvme_start_queues(&dev->ctrl);
>> +		nvme_end_requests(&dev->ctrl);
> The blk-mq cpuhp notifier has been changed by Christoph's 4b855ad (blk-mq: Create hctx for each present CPU),
> the deadlocking here should have been fixed here.
> So the comment here should be modified at least to avoid confusion.
> On the other hand, we needn't freeze the queue for reset case, the device will be setup soon later, just
> quiesce the blk-mq queue should be ok. And regarding to the shutdown case, frozen and drained queue will
> be safer. To drain the queue, we have to unquiesce it.

I think that this is exactly the point of the patch, not to unquiesce
and rely on .queue_rq to fail the requests.



More information about the Linux-nvme mailing list