Commit 97416f67 authored by Damien Le Moal's avatar Damien Le Moal Committed by Christoph Hellwig

nvmet: fix Identify Active Namespace ID list handling

The identify command with cns set to NVME_ID_CNS_NS_ACTIVE_LIST does
not depend on the command set. The execution of this command should
thus not look at the csi field specified in the command. Simplify
nvmet_execute_identify() to directly call
nvmet_execute_identify_nslist() without the csi switch-case.

Fixes: ab5d0b38 ("nvmet: add Command Set Identifier support")
Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Tested-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 62904b3b
...@@ -718,13 +718,8 @@ static void nvmet_execute_identify(struct nvmet_req *req) ...@@ -718,13 +718,8 @@ static void nvmet_execute_identify(struct nvmet_req *req)
} }
break; break;
case NVME_ID_CNS_NS_ACTIVE_LIST: case NVME_ID_CNS_NS_ACTIVE_LIST:
switch (req->cmd->identify.csi) { nvmet_execute_identify_nslist(req);
case NVME_CSI_NVM: return;
return nvmet_execute_identify_nslist(req);
default:
break;
}
break;
case NVME_ID_CNS_NS_DESC_LIST: case NVME_ID_CNS_NS_DESC_LIST:
if (nvmet_handle_identify_desclist(req) == true) if (nvmet_handle_identify_desclist(req) == true)
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment