extend nvme show-topology tabular output#3228
Merged
igaw merged 2 commits intolinux-nvme:masterfrom Apr 1, 2026
Merged
Conversation
The current tabular output of show-topology command does not display a controller if it has no associated namespaces. However, it is valid for a controller within a subsystem to have no namespaces attached. In such cases, it is still useful to display controller information such as the controller name, transport type, address, and state, while leaving the namespace-related fields (e.g., namespace and nsid) as "--". Update the tabular output of show-topology command to include controllers and their associated fields regardless of whether any namespaces are present. While we are at it, also dispaly the error message using nvme_show_error() instead of using printf(). This change applies to non-multipath subsystems. A subsequent commit will extend this behavior to multipath subsystems. Signed-off-by: Nilay Shroff <nilay@linux.ibm.com> [wagi: reformatted argument list and dropped redundant comments] Signed-off-by: Daniel Wagner <wagi@kernel.org>
The current tabular output of the show-topology command does not display a controller if it has no associated nvme path or namespaces. However, it is valid for a controller within a subsystem to have no namespaces or paths attached. In such cases, it is still useful to display controller information such as the controller name, transport type, address, and state, while leaving NVMe path and namespace-related fields (e.g., nsid, nshead, nspath, anastate etc.) as "--". Update the tabular output of the show-topology command to include controllers and their associated fields regardless of whether any namespaces are present. While we are at it, also dispaly the error message using nvme_show_error() instead of using printf(). This change applies to NVMe multipath subsystems. Signed-off-by: Nilay Shroff <nilay@linux.ibm.com> [wagi: reformatted argument list and redudant comments] Signed-off-by: Daniel Wagner <wagi@kernel.org>
Collaborator
Author
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patchset extends the tabular output of the "nvme show-topology"
command.
Currently, the tabular output does not display controller information
if a controller has no associated namespaces or paths. However, it is
valid for a controller within a subsystem to have no namespaces or
paths attached.
In such cases, it is still useful to display controller information
such as the controller name, transport type, address, and state,
while leaving namespace and path-related fields (e.g., nsid, nshead,
anastate, nspath) empty.
This patchset is divided into two patches, first patch extends the output
for non-multipath subsystems while the second patch extends the output for
multipath subsystems.