nvme-print: print generic ns chardev in verbose mode
Generic device (e.g., /dev/ng0n1) is mapped to a block device (e.g.,
/dev/nvme0n1). This chardev can be taken in case that block device is
failed to initialize from the kernel due to some reasons (e.g.,
metadata initialization failed). This generic node information can be
shown in the verbose list mode with HIDDEN block device (nvme0n1 in the
below example).
root@localhost:~# nvme list -v
NVM Express Subsystems
Device Generic NSID Usage Format Controllers
------------ ------------ -------- -------------------------- ---------------- ----------------
nvme0n1 ng0n1 1 0.00 B / 0.00 B 1 B + 0 B nvme0
nvme0n2 ng0n2 2 268.44 MB / 268.44 MB 4 KiB + 0 B nvme0
The nvme0n1 is failed to initialize and it shows 0.00 B size which is
invalid. In this case, we can take /dev/ng0n1 alternatively from the
application through generic I/O path.
Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
[dwagner: - ported from nvme-cli-monolithic
- fixed indention] Signed-off-by: Daniel Wagner <dwagner@suse.de>