[PATCH V13 2/4] nvmet: add ZBD over ZNS backend support

Christoph Hellwig hch at lst.de
Fri Apr 9 10:53:37 BST 2021


On Fri, Apr 09, 2021 at 07:09:12AM +0000, Chaitanya Kulkarni wrote:
> diff --git a/drivers/nvme/target/admin-cmd.c
> b/drivers/nvme/target/admin-cmd.c
> index fc5f64a38661..da6d5225f25a 100644
> --- a/drivers/nvme/target/admin-cmd.c
> +++ b/drivers/nvme/target/admin-cmd.c
> @@ -685,6 +685,14 @@ static void nvmet_execute_identify(struct nvmet_req
> *req)
>         if (!nvmet_check_transfer_len(req, NVME_IDENTIFY_DATA_SIZE))
>                 return;
>  
> +       switch (req->cmd->identify.csi) {
> +       case NVME_CSI_NVM:
> +       case NVME_CSI_ZNS:
> +               break;
> +       default:
> +               goto out;
> +       }
> +

I don't think thi is the right thing to do as only a few CNS values
look at the CSI, so we'd need this switch in those switch cases that
need CNS values only.

The rest looks good.



More information about the Linux-nvme mailing list