From: sbates@raithlin.com (Stephen Bates)
Subject: [PATCH 2/2] nvme/multipath: Fix multipath disabled naming collisions
Date: Mon, 29 Oct 2018 15:37:46 +0000 [thread overview]
Message-ID: <CAD4F464-15CC-44B9-9C72-B5F2BDFC5445@raithlin.com> (raw)
In-Reply-To: <20180426214956.3377-3-keith.busch@intel.com>
> When CONFIG_NVME_MULTIPATH is set, but we're not using nvme to multipath,
> namespaces with multiple paths were not creating unique names due to
> reusing the same instance number from the namespace's head.
>
> This patch fixes this by falling back to the non-multipath naming method
> when the parameter disabled using multipath.
Hi All
Andrew and I have been doing some testing on systems with quite a few NVMe controllers in them. Some of these have one namespace and some have multiple. We (by mistake) had CONFIG_NVME_MULTIPATH enabled in the .config and noticed some unusual naming in the sysfs tree. Basically the namespace names no longer align with the controller names. This leads to hilarity as we try to co-ordinate IO between the namespaces and try to work out what namespace is where in the system. For example on a QEMU system with six NVMe SSD models in it we get something like:
root at donard-qemu:~# ls -la /sys/bus/pci/devices/0000\:00\:04.0/nvme/nvme0/
total 0
drwxr-xr-x 4 root root 0 Oct 29 15:32 .
drwxr-xr-x 3 root root 0 Oct 29 15:32 ..
-r--r--r-- 1 root root 4096 Oct 29 15:32 address
-r--r--r-- 1 root root 4096 Oct 29 15:32 cntlid
-r--r--r-- 1 root root 4096 Oct 29 15:32 dev
lrwxrwxrwx 1 root root 0 Oct 29 15:32 device -> ../../../0000:00:04.0
-r--r--r-- 1 root root 4096 Oct 29 15:32 firmware_rev
-r--r--r-- 1 root root 4096 Oct 29 15:32 model
drwxr-xr-x 9 root root 0 Oct 29 15:32 nvme1n1
drwxr-xr-x 2 root root 0 Oct 29 15:32 power
--w------- 1 root root 4096 Oct 29 15:32 rescan_controller
--w------- 1 root root 4096 Oct 29 15:32 reset_controller
-r--r--r-- 1 root root 4096 Oct 29 15:32 serial
-r--r--r-- 1 root root 4096 Oct 29 15:32 state
-r--r--r-- 1 root root 4096 Oct 29 15:32 subsysnqn
lrwxrwxrwx 1 root root 0 Oct 29 15:32 subsystem -> ../../../../../class/nvme
-r--r--r-- 1 root root 4096 Oct 29 15:32 transport
-rw-r--r-- 1 root root 4096 Oct 29 15:32 uevent
Note how the /nvme/nvme0/ sysfs directory contains the nvme1n1 namespace. Is this expected? I am not that familiar with the multipath code so I'm not sure if this is a bug or not but it sure is confusing. Disabling CONFIG_NVME_MULTIPATH reverts to the legacy naming convention. This happens in all the 4.19, 4.18 and 4.17 kernels we tested. I've not tried the for-next tree.
Stephen
next prev parent reply other threads:[~2018-10-29 15:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-26 21:49 [PATCH 0/2] nvme multipath naming fixes Keith Busch
2018-04-26 21:49 ` [PATCH 1/2] nvme/multipath: Disable runtime writable enabling parameter Keith Busch
2018-04-27 5:20 ` Christoph Hellwig
2018-04-27 15:48 ` Keith Busch
2018-10-30 18:17 ` Sagi Grimberg
2018-10-30 18:18 ` Sagi Grimberg
2018-10-30 18:24 ` Keith Busch
2018-10-31 5:28 ` Christoph Hellwig
2018-04-26 21:49 ` [PATCH 2/2] nvme/multipath: Fix multipath disabled naming collisions Keith Busch
2018-04-27 5:21 ` Christoph Hellwig
2018-10-29 15:37 ` Stephen Bates [this message]
2018-10-29 15:42 ` Keith Busch
2018-10-29 15:48 ` Stephen Bates
2018-10-29 15:55 ` 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=CAD4F464-15CC-44B9-9C72-B5F2BDFC5445@raithlin.com \
--to=sbates@raithlin.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