[PATCH] nvme-list: fix verbose JSON output for 'nvme list' command

Nilay Shroff nilay at linux.ibm.com
Mon Aug 4 21:30:53 PDT 2025



On 8/4/25 8:55 PM, Daniel Wagner wrote:
> On Thu, Jul 24, 2025 at 04:18:16PM +0200, Daniel Wagner wrote:
>>
>> On Mon, 21 Jul 2025 15:59:11 +0530, Nilay Shroff wrote:
>>> The verbose JSON output of the nvme list command is currently incorrect in
>>> both multipath and non-multipath configurations. Specifically, it prints
>>> empty Namespaces[] and Paths[] arrays in the wrong places, leading to
>>> confusion and invalid output. For example, on a system with single NVMe
>>> disk, signle controller and one namepsace created, 'nvme list --verbose
>>> --output json' prints the following output:
>>>
>>> [...]
> 
> FYI, this patch is causing a regression:
> 
> https://github.com/linux-nvme/nvme-cli/issues/2886

Okay so does it make sense to retain the old output with the
default --output-format-version=1? But then if the user selects
--output-format-version=2 then we'd switch to the new output 
format?

Thanks,
--Nilay


 



More information about the Linux-nvme mailing list