[PATCHv4] nvme: allow to re-attach namespaces after all paths are down
Hannes Reinecke
hare at suse.de
Mon May 17 08:36:39 PDT 2021
On 5/17/21 5:26 PM, Keith Busch wrote:
> On Mon, May 17, 2021 at 10:18:09AM +0200, Hannes Reinecke wrote:
>> We should only remove the ns head from the list of heads per
>> subsystem if the reference count drops to zero. Removing it
>> at the start of nvme_ns_remove() will prevent us from reattaching
>> the namespace to the correct ns head once a path becomes available
>> again.
>
> This looks fine to me
>
> Reviewed-by: Keith Busch <kbusch at kernel.org>
>
> There are potential corner cases associated with namespace management
> that can cause problems here, but it would certainly be a user error
> that needs manual intervention anyway. I suspect those scenarios are
> very uncommon too, so I think we can deal with that later if it becomes
> a problem.
>
How so?
We're keeping a copy of the NS IDs around, so after reconnect the
namespace would have to provide same set of NS IDs.
If the namespace is different yet providing the same NS IDs we'll have a
problem even with the current code, as we're using the ND ID to identify
multipathed namespaces.
Or do you have a different scenario in mind?
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.de +49 911 74053 688
SUSE Software Solutions Germany GmbH, 90409 Nürnberg
GF: F. Imendörffer, HRB 36809 (AG Nürnberg)
More information about the Linux-nvme
mailing list