[PATCH 0/2] nvme-cli: limit printing iopolicy in subsystem header
Nilay Shroff
nilay at linux.ibm.com
Mon Jan 12 03:15:59 PST 2026
Hi,
The nvme-cli currently prints the iopolicy value in the subsystem header
for both the show-topology and list-subsys commands. This behavior was
introduced by commit d0b4c6cf0006 (“nvme: extend show-topology command
to add support for multipath”).
Printing the iopolicy value in the output of the show-topology command is
intentional and useful. The command also displays additional columns such
as Nodes or queue-depth, depending on the configured I/O policy. Including
the iopolicy in the header makes it easier to correlate the output with the
active policy and understand the resulting I/O path behavior.
However, the iopolicy value is not particularly relevant for the list-subsys
command. It currently appears there for non-verbose output because both
show-topology and list-subsys commands share a common helper function that
prints the subsystem header. As a result, the iopolicy field unintentionally
leaked into the list-subsys output.
In addition, while the iopolicy field is shown in the regular text output
of show-topology, it was missing from the JSON output format when show-topology
is executed in non-verbose mode. This patchset addresses both of these issues
and consists of two patches:
First patch avoids printing the iopolicy field in the list-subsys output
unless the command is invoked with the verbose flag.
Second patch adds the iopolicy field to the JSON output of the show-topology
command.
Thanks!
Nilay Shroff (2):
nvme: avoid printing iopolicy in list-subsys output
nvme: add iopolicy field in JSON output
nvme-print-json.c | 4 ++--
nvme-print-stdout.c | 14 ++++++++------
2 files changed, 10 insertions(+), 8 deletions(-)
--
2.52.0
More information about the Linux-nvme
mailing list