[PATCH] nvme: allow to re-attach namespaces after all paths are down

Keith Busch kbusch at kernel.org
Tue May 11 14:37:41 PDT 2021


On Mon, May 10, 2021 at 03:25:04PM -0700, Sagi Grimberg wrote:
> Hannes, you sent a patch like this before, my comment was that a nshead
> should be removed before the final reference (which who knows when it
> will ever arrive) as if a nsid were to be reused by the controller for
> a different namespace then we'd reject it so I'm not sure how this helps?

Hm, you're considering something like if a user does namespace
management commands to delete one that is in-use (mounted, raid, etc),
then creates and attaches a new namespace that happens to be assigned
the same NSID.

The new one may get different EUI/NGUID values, so this approach here
would prevent the namespace from being usable without additional user
intervention. I think we'd want the driver to allocate an entirely new
head in that case if we could detect that's what happened. There is also
a possibility that the controller recycles the same NGUID for the new
namespace, and that could be confusing for the application holding the
open reference on the old namespace.



More information about the Linux-nvme mailing list