public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Nilay Shroff <nilay@linux.ibm.com>
Cc: Hannes Reinecke <hare@suse.de>, Keith Busch <kbusch@meta.com>,
	linux-nvme@lists.infradead.org, hch@lst.de, mlombard@redhat.com,
	jmeneghi@redhat.com
Subject: Re: [RFC-PATCH 2/2] nvme: use the namespace id for block device names
Date: Wed, 4 Mar 2026 07:53:08 -0700	[thread overview]
Message-ID: <aahHVAyi9CINoBUv@kbusch-mbp> (raw)
In-Reply-To: <d2bc9d0e-dc9b-4c98-b07d-8c8f667b7c0e@linux.ibm.com>

On Wed, Mar 04, 2026 at 05:25:28PM +0530, Nilay Shroff wrote:
> I think we need to ensure that the head disk is fully removed from the
> system before a new head is created that may reuse the same NSID; otherwise
> we may run into name collisions. Since removal of the sysfs entries
> associated with the disk can be delayed, a namespace scan may attempt to
> create a new head with the same name while the previous one is still being
> torn down.
> 
> To avoid this, it might be better to defer removing head->entry from the
> subsys->nsheads list until after the head node´s gendisk has been removed in
> nvme_remove_head().
> 
> From your first patch in this series, I see that the removal of
> head->entry from subsys->nsheads was moved to the beginning of
> nvme_remove_head(). IMO, in addition to the change you proposed above, if we
> also move the removal of head->entry until after del_gendisk() is called,
> that should ensure the old disk is fully removed before a new head with the
> same NSID can be created.

Yeah, I'm really sure why it was done in two steps split across
different subsystem lock contexts.

I'll respin the series along with the last two patches from this one:

  https://lore.kernel.org/linux-nvme/20260226183216.2098584-1-kbusch@meta.com/


  reply	other threads:[~2026-03-04 14:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-02 22:25 [RFC-PATCH 1/2] nvme-multipath: delete gendisk under subsys lock Keith Busch
2026-03-02 22:25 ` [RFC-PATCH 2/2] nvme: use the namespace id for block device names Keith Busch
2026-03-03  7:34   ` Hannes Reinecke
2026-03-03 15:39     ` Keith Busch
2026-03-03 16:53       ` Keith Busch
2026-03-04 11:55         ` Nilay Shroff
2026-03-04 14:53           ` Keith Busch [this message]
2026-03-03  7:29 ` [RFC-PATCH 1/2] nvme-multipath: delete gendisk under subsys lock Hannes Reinecke

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=aahHVAyi9CINoBUv@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=jmeneghi@redhat.com \
    --cc=kbusch@meta.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=mlombard@redhat.com \
    --cc=nilay@linux.ibm.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