[PATCH 3/4] NVMe: Surprise removal fixes

Keith Busch keith.busch at intel.com
Mon Feb 8 15:48:55 PST 2016


On Mon, Feb 08, 2016 at 06:38:23PM +0000, Keith Busch wrote:
> On Mon, Feb 08, 2016 at 10:16:40AM -0800, Christoph Hellwig wrote:
> > Do we really still need all this magic if ->queue_rq returns a failure
> > if the queue is dying?
> 
> This is far from perfect. Let me try explaining what's happening, then
> I hope to abandon this patch and do it correctly. :)

I've a new patch that passes all my tests, including the removal deadlock
using device states.

I have namespace capacity set to 0 and revalidate to get buffered writers
to end. The error handling is done in the nvme_workq, which currently
has WQ_MEM_RECLAIM set. That trigger a warning when revalidate_disk
attempts to sync with a non-MEM_RECLAIM work queue, so I removed the
flag from NVMe's to suppress the warning, but I don't see what having
that flag gained us in the first place. It looks to me that it just
spawns a rescuer, but do we need that?



More information about the Linux-nvme mailing list