[PATCH 1/2] NVMe: Make surprise removal work again

Keith Busch keith.busch at intel.com
Wed Jan 27 06:19:32 PST 2016


On Wed, Jan 27, 2016 at 01:47:45PM +0200, Sagi Grimberg wrote:
> >  		blk_mq_abort_requeue_list(ns->queue);
> >+		__nvme_start_queue_locked(ns);
> 
> Why not making sure that all the pending requests are moved to
> the requeue list before we even get here? call nvme_cancel_io on
> pending requests which would either fail the requests (blk_queue_dying)
> or move them to the requeue list?

That works only for active requests. There could be processes that entered
the queue and waiting for request tags to become available. These need
to be flushed to completion somehow ... maybe they shouldn't even succeed
in getting a request on a dying queue?

> >+	if (unlikely(blk_queue_dying(req->q))) {
> >+		blk_mq_end_request(req, -EIO);
> >+		return BLK_MQ_RQ_QUEUE_OK;
> >+	}
> 
> This is something we should try our best to move away from IMO...

Agreed, though I think this is better than relying on queue freeze that
used to happen.



More information about the Linux-nvme mailing list