All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Meneghini <jmeneghi@redhat.com>
To: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: nvme/pcie hot plug results in /dev name change
Date: Fri, 20 Jan 2023 14:50:46 -0500	[thread overview]
Message-ID: <472fe309-f0f9-65bf-1ad1-8a92a349e973@redhat.com> (raw)

We have a customer complaining that when they hot unplug/plug their nvme-pci device the device name changes.

For example, when they hot remove /dev/nvme1n1 physically, then reinsert it, it gets identified as /dev/nvme4n1.

IIRC there is nothing about nvme_init_ctrl that guarantees the ctrl->instance will be the same because
ida_alloc() will only return the next free id in the bitmap.

The fact that nvme_remove ->  nvme_init_ctrl many times results in the same ctrl->instance is just a happen stance and there is 
nothing that guarantees /dev name consistency in Linux. Especially in the case of hot unplug/plug where the controller may very 
well be marked NVME_CTRL_DEAD due to the ungraceful disconnect.

True?

-- 
John A. Meneghini
Senior Principal Platform Storage Engineer
RHEL SST - Platform Storage Group
jmeneghi@redhat.com



             reply	other threads:[~2023-01-20 19:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-20 19:50 John Meneghini [this message]
2023-01-20 21:42 ` nvme/pcie hot plug results in /dev name change Keith Busch
2023-01-21  7:01   ` Christoph Hellwig
2023-01-29 10:28     ` Ming Lei
2023-01-31 16:38       ` Keith Busch
2023-02-01  2:33         ` Ming Lei
2023-02-01  6:27           ` Christoph Hellwig
2023-02-01 16:31             ` Keith Busch
2023-02-13 14:01               ` Sagi Grimberg
2023-02-13 16:32                 ` Keith Busch
2023-02-14  0:04                   ` Ming Lei
2023-02-14  9:18                     ` Sagi Grimberg
2023-02-15  1:04                       ` Ming Lei
2023-02-14 16:17                     ` Keith Busch
2023-02-15  1:11                       ` Ming Lei
2023-02-14  9:04                   ` Sagi Grimberg
2023-02-15  6:18                   ` Christoph Hellwig
2023-02-15  8:56                     ` Sagi Grimberg
2023-02-15 22:18             ` Keith Busch

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=472fe309-f0f9-65bf-1ad1-8a92a349e973@redhat.com \
    --to=jmeneghi@redhat.com \
    --cc=linux-nvme@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.