[PATCHv2-4.5 08/10] NVMe: Move error handling to failed reset handler

Christoph Hellwig hch at infradead.org
Wed Feb 17 00:06:01 PST 2016


On Tue, Feb 16, 2016 at 09:57:47PM +0000, Keith Busch wrote:
> > 
> > Why do we have a separate function for this instead of driving this
> > from nvme_remove_namespaces?
> 
> nvme_remove_namespaces attempts to remove namespaces assuming the
> controller is still functional. For example, user pushed the "Attention"
> removal button and waits for the acknowledgement.

But we'll always call it before removing a controller anyway.

> This new API assumes the controller is not functional and never will be.
> 
> If your question is why nvme_remove_namespaces doesn't handle both cases,
> it's because the controller could break/link-down only after calling
> del_gendisk, at which point its too late for the driver to kill the
> queue in that path.

My idea was more to have a kill flag for nvme_remove_namespaces given
that we basically always follow up with a nvme_remove_namespaces when
calling nvme_kill_ns_queues.  But looking at the code this might
actually end up more convoluted, so I'll take my comment back.



More information about the Linux-nvme mailing list