]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
nvme-cli/list-ns: fix identifying active or allocated namespaces list
authorGuan Junxiong <guanjunxiong@huawei.com>
Mon, 10 Jul 2017 07:56:07 +0000 (15:56 +0800)
committerKeith Busch <keith.busch@intel.com>
Mon, 10 Jul 2017 16:46:32 +0000 (12:46 -0400)
commit390bdcbec7373c5b7057bff056ec73e608a19d1f
tree45b22c63be773efdcf6244ba236435f0196787af
parent6c5fc863a7fe64ca4e9414213004196c24ea0c03
nvme-cli/list-ns: fix identifying active or allocated namespaces list

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.

Signed-off-by: Guan Junxiong <guanjunxiong@huawei.com>
Reviewed-by: Sagi Grimberg <sagi at grimberg.me>
Signed-off-by: Keith Busch <keith.busch@intel.com>
nvme-ioctl.c