[PATCH 1/2] nvmet: handle admin default command set identifier
Christoph Hellwig
hch at lst.de
Thu Apr 7 22:45:16 PDT 2022
On Thu, Apr 07, 2022 at 07:39:29PM -0700, Chaitanya Kulkarni wrote:
> switch (req->cmd->identify.csi) {
> case NVME_CSI_ZNS:
> return nvmet_execute_identify_cns_cs_ctrl(req);
> + case NVME_CSI_NVM:
> + return nvmet_execute_identify_ctrl(req);
This needs to return the "I/O Command Set Specific Identify Controller data
structure" defined in Figure 102 of the NVM Command specification
> default:
> break;
> }
> + } else {
> + switch (req->cmd->identify.csi) {
> + case NVME_CSI_NVM:
> + return nvmet_execute_identify_ctrl(req);
> + }
And we should probably restructure the code like:
switch (req->cmd->identify.csi) {
case NVME_CSI_NVM:
return nvmet_execute_identify_cns_cs_ctrl_nvm(ctrl);
case NVME_CSI_ZNS:
if (!IS_ENABLED(CONFIG_BLK_DEV_ZONED))
break;
return nvmet_execute_identify_cns_cs_ctrl_zns(ctrl);
More information about the Linux-nvme
mailing list