All of lore.kernel.org
 help / color / mirror / Atom feed
From: keith.busch@linux.intel.com (Keith Busch)
Subject: How /dev/nvme numbers are allocated/mapped to BDF
Date: Fri, 3 Aug 2018 08:40:25 -0600	[thread overview]
Message-ID: <20180803144025.GA4381@localhost.localdomain> (raw)
In-Reply-To: <20180803071820.GA22003@infradead.org>

On Fri, Aug 03, 2018@12:18:20AM -0700, Christoph Hellwig wrote:
> On Thu, Aug 02, 2018@10:09:50PM +0000, Alex_Gagniuc@Dellteam.com wrote:
> > Hi,
> > 
> > Recently some confusion came up about how the /dev/nvme numbers are 
> > allocated, and how much one can expect the to be consistent across 
> > reboots. I was fairly convinced that it was about as random as a coin 
> > flip, but some people have pointed out that these numbers were very 
> > deterministic in older kernels, dating back to the 3.10 era.
> 
> They are allocated using an ida allocator and are not stable at all.
> For any stable enumeration you have to rely on the EUI64/NGUID/UUID.

Yeah, the were always allocated through an ida and were never stable in
any kernel version.
 
> > Also, separate but related question. Samsung M1725a drives don't 
> > generate entries under /dev/disk/by-path. Any idea why that might be?
> 
> Please send a dump of the nvme-cli id-ctrl subcommand.

The 'by-path' should actually only depend on the PCI BDf and the 'nsid'
attribute. The bdf is not necessarilly stable.

If using systemd, you'd need thsi commit to get the by-path links:

  https://github.com/systemd/systemd/commit/b4c6f71b827d41a4af8007b735edf21ef7609f99

  reply	other threads:[~2018-08-03 14:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-02 22:09 How /dev/nvme numbers are allocated/mapped to BDF Alex_Gagniuc
2018-08-03  7:18 ` Christoph Hellwig
2018-08-03 14:40   ` Keith Busch [this message]
2018-08-03 16:16     ` Alex_Gagniuc
2018-08-03 16:54       ` Keith Busch
2018-08-03 16:58         ` Johannes Thumshirn
2018-08-03 17:07           ` Keith Busch
2018-08-03 17:20         ` Alex_Gagniuc
2018-08-03 17:40           ` Keith Busch
2018-08-04  8:16         ` Christoph Hellwig
2018-08-05 15:48           ` Alex_Gagniuc

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=20180803144025.GA4381@localhost.localdomain \
    --to=keith.busch@linux.intel.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 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.