Skip to content

Restrict 'nvme list' to disks, i.e. exclude partitions#53

Merged
keithbusch merged 1 commit intolinux-nvme:masterfrom
amluto:nvme-list
Jan 27, 2016
Merged

Restrict 'nvme list' to disks, i.e. exclude partitions#53
keithbusch merged 1 commit intolinux-nvme:masterfrom
amluto:nvme-list

Conversation

@amluto
Copy link
Contributor

@amluto amluto commented Jan 27, 2016

I used to see:

Node             Model                Version  Namepace Usage                      Format           FW Rev  
---------------- -------------------- -------- -------- -------------------------- ---------------- --------
/dev/nvme0n1     Samsung SSD 950 PRO  1.1      1         73.12  GB / 512.11  GB    512   B +  0 B   1B0QBXX7
/dev/nvme0n1p1   Samsung SSD 950 PRO  1.1      1         73.12  GB / 512.11  GB    512   B +  0 B   1B0QBXX7
/dev/nvme0n1p2   Samsung SSD 950 PRO  1.1      1         73.12  GB / 512.11  GB    512   B +  0 B   1B0QBXX7
/dev/nvme0n1p3   Samsung SSD 950 PRO  1.1      1         73.12  GB / 512.11  GB    512   B +  0 B   1B0QBXX7

Now I see:

Node             Model                Version  Namepace Usage                      Format           FW Rev  
---------------- -------------------- -------- -------- -------------------------- ---------------- --------
/dev/nvme0n1     Samsung SSD 950 PRO  1.1      1         73.12  GB / 512.11  GB    512   B +  0 B   1B0QBXX7

I think it would be even better to enumerate all nvme admin devices and then list the namespaces for each device, but this is probably a decent start toward improving 'nvme list'.

This stops 'nvme list' from separately enumerating all partitions.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
keithbusch pushed a commit that referenced this pull request Jan 27, 2016
Restrict 'nvme list' to disks, i.e. exclude partitions
@keithbusch keithbusch merged commit 9779e91 into linux-nvme:master Jan 27, 2016
@keithbusch
Copy link
Contributor

Yeah, we can do better with the table output. Similar to how partitions used to be displayed, controller information is also duplicated with multi-namespace devices still.

@sbates130272
Copy link
Contributor

Thanks for this. Yes a cleanup here would be good so if you can please send those 'improvements' ;-)

ikegami-t pushed a commit to ikegami-t/nvme-cli that referenced this pull request Aug 18, 2023
Fix version number for meson build
jimmunn added a commit to Micron-TPG-OSS/nvme-cli that referenced this pull request Feb 23, 2026
Remove --strict from call to checkpatch.pl to match upstream behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants