[PATCH v2] nvme-cli/list-ns: fix identifying active or allocated namespaces list

Keith Busch keith.busch at intel.com
Mon Jul 10 09:59:18 PDT 2017


On Mon, Jul 10, 2017 at 03:56:07PM +0800, Guan Junxiong wrote:
> The logic of the CNS field of identify namespace list is wrong.
> For example, nvme list-ns /dev/nvme0 -n 0  should return active
> namespaces list starting with id 1 (including), but currently this
> script command returns INVALID_OPCODE if the target doesn't support 
> listing allocated namespaces or all the allocated attached namespaces
> id. So fix it by swaping the CNS flags of active and allocated list.

Thanks for the fix. Applied as-is, but I just want to point out that
the status code for the situation you're describing should have been
"Invalid Field in Command" rather than "Invalid Opcode".



More information about the Linux-nvme mailing list