Re: [PATCH 4/4] nvme: check that EUI/GUID/UUID are globally unique

Keith Busch
2022-06-07T19:01:47Z

On Mon, Jun 06, 2022 at 11:11:22PM +0000, Alan Adamson wrote:
>
>
> > On Jun 6, 2022, at 2:58 PM, Keith Busch <kbusch@kernel.org> wrote:
> >
> > On Mon, Jun 06, 2022 at 09:51:55PM +0000, Alan Adamson wrote:
> >>> On Jun 6, 2022, at 2:38 PM, Keith Busch <kbusch@kernel.org> wrote:
> >>>
> >>> Shouldn't the nvme-passthrough target just change the cntlid so it looks like
> >>> two controllers in the same subsystem? That would just need to stop overriding
> >>> the subsysnqn, which is what currently happens.
> >>
> >> That was my original proposal a while ago, though I wasn’t certain what to change. Should the UUID/GUID just be zeroed out? Is it ok to do that for all passthru targets?
> >
> > Can't the namespace id's be left the unmodified? The loop and pcie targets
> > would just look like two paths to the same namespace, which is essentially what
> > they are.
>
> nvme_global_check_duplicate_ids() fails when the id’s are the same. They are kinda
> shared namespaces and we can set nmic on the loop target, but the pcie target is
> unaware of it being shared.

Gotcha, the pcie target potentially lacking cmic/nmic awareness does appear to
make my idea unreasonable to implement. Thanks for the follow up info.