Re: [PATCH v2] driver/nvme/host: Support duplicated nsid for the private ns

From: hch@xxxxxx
Date: Tue Mar 15 2022 - 04:46:19 EST


On Tue, Mar 15, 2022 at 10:42:56AM +0200, Sagi Grimberg wrote:
>>>> + * We also do this for private namespaces as the namespace sharing flag
>>>> + * could change after a rescan.
>>>
>>> What happens in this case? we now have non-unique shared namespaces?
>>
>> The non-uniqueue NSIDs can only happen for private namespaces.
>
> But what happens if this changes upon a rescan as you commented?

Well, it can't change to shared as the nsids are non-unique. If we
want to be paranoid we could add a sanity check for that, but then
again there are a bunch of other things where we could be more paranoid.