public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "hch@lst.de" <hch@lst.de>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: "hch@lst.de" <hch@lst.de>, Sungup Moon <sungup.moon@samsung.com>,
	"kbusch@kernel.org" <kbusch@kernel.org>,
	"axboe@fb.com" <axboe@fb.com>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] driver/nvme/host: Support duplicated nsid for the private ns
Date: Tue, 15 Mar 2022 09:40:35 +0100	[thread overview]
Message-ID: <20220315084035.GA3834@lst.de> (raw)
In-Reply-To: <a3051d85-c08e-a273-c7cc-2eb3e21df717@grimberg.me>

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.

  reply	other threads:[~2022-03-15  8:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220314110545epcms2p4a227eac7c4652445050e70ee2350635d@epcms2p4>
2022-03-14 11:05 ` [PATCH v2] driver/nvme/host: Support duplicated nsid for the private ns Sungup Moon
2022-03-15  7:12   ` hch
2022-03-15  7:19     ` hch
2022-03-15  8:18       ` Sagi Grimberg
2022-03-15  8:40         ` hch [this message]
2022-03-15  8:42           ` Sagi Grimberg
2022-03-15  8:46             ` hch
2022-03-15  8:54               ` Sagi Grimberg
2022-03-15 10:24               ` Sungup Moon
2022-03-15  9:56     ` Sungup Moon
2022-03-15 10:07       ` (2) " hch
2022-03-15 10:56         ` Sungup Moon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220315084035.GA3834@lst.de \
    --to=hch@lst.de \
    --cc=axboe@fb.com \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=sungup.moon@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox