[PATCH 13/13] nvme: introduce generic per-namespace chardev
Christoph Hellwig
hch at lst.de
Mon Apr 12 08:44:55 BST 2021
On Fri, Apr 09, 2021 at 08:24:01PM +0900, Minwoo Im wrote:
> I think if we don't have a route to the live controller from the
> multipath node /dev/ng0n1, how does application figure out controller
> node to request admin commands like Identify Namespace before their
> own I/O ?
>
> We have sysfs, but it does not provide every information about the
> namespace. Or is there any charming way to find out the live
> controller from a head node through sysfs or something that I missed
> here ? :)
The devie links points to the subsystem, which then points to the
controllers:
root at testvm:/sys/class/nvme-generic/ng0n1# ls -l device/
total 0
-r--r--r-- 1 root root 4096 Apr 12 07:43 firmware_rev
-rw-r--r-- 1 root root 4096 Apr 12 07:44 iopolicy
-r--r--r-- 1 root root 4096 Apr 12 07:43 model
drwxr-xr-x 3 root root 0 Apr 12 07:43 ng0n1
drwxr-xr-x 3 root root 0 Apr 12 07:43 ng0n2
lrwxrwxrwx 1 root root 0 Apr 12 07:44 nvme0 -> ../../nvme-fabrics/ctl/nvme0
drwxr-xr-x 9 root root 0 Apr 12 07:43 nvme0n1
drwxr-xr-x 9 root root 0 Apr 12 07:43 nvme0n2
lrwxrwxrwx 1 root root 0 Apr 12 07:44 nvme1 -> ../../nvme-fabrics/ctl/nvme1
drwxr-xr-x 2 root root 0 Apr 12 07:44 power
-r--r--r-- 1 root root 4096 Apr 12 07:43 serial
-r--r--r-- 1 root root 4096 Apr 12 07:44 subsysnqn
lrwxrwxrwx 1 root root 0 Apr 12 07:43 subsystem -> ../../../../class/nvme-subsystem
-rw-r--r-- 1 root root 4096 Apr 12 07:43 uevent
More information about the Linux-nvme
mailing list