[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6ac83f8b-01e6-5394-0570-023ac6b1a71d@grimberg.me>
Date: Tue, 15 Mar 2022 10:42:56 +0200
From: Sagi Grimberg <sagi@...mberg.me>
To: "hch@....de" <hch@....de>
Cc: Sungup Moon <sungup.moon@...sung.com>,
"kbusch@...nel.org" <kbusch@...nel.org>,
"axboe@...com" <axboe@...com>,
"linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] driver/nvme/host: Support duplicated nsid for the
private ns
>>> +static struct nvme_ns_head *nvme_find_ns_head(struct nvme_ctrl *ctrl,
>>> unsigned nsid)
>>> {
>>> + struct nvme_subsystem *subsys = ctrl->subsys;
>>> struct nvme_ns_head *h;
>>> lockdep_assert_held(&subsys->lock);
>>
>> IMO it is a bit strange that we now don't pass in the subsystem but
>> require that the subsys->lock is taken...
>
> We do things like that in various places, mostly because information
> needed that is subsystem-wide hangs of the nvme_ctrl structure, in
> this case the various feature bitmaps. We could move them to the
> subsystem structure, which would be the right thing to do but a fair
> amout of churn for little savings.
Yea I understand its not universally enforced, just popped up.
>>> +++ b/drivers/nvme/host/multipath.c
>>> @@ -504,10 +504,11 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
>>> /*
>>> * Add a multipath node if the subsystems supports multiple controllers.
>>> - * We also do this for private namespaces as the namespace sharing data could
>>> - * change after a rescan.
>>> + * 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?
Powered by blists - more mailing lists