[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220315084035.GA3834@lst.de>
Date: Tue, 15 Mar 2022 09:40:35 +0100
From: "hch@....de" <hch@....de>
To: Sagi Grimberg <sagi@...mberg.me>
Cc: "hch@....de" <hch@....de>, 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
On Tue, Mar 15, 2022 at 10:18:30AM +0200, Sagi Grimberg wrote:
>> +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.
>> +++ 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.
Powered by blists - more mailing lists