[PATCH V13 1/4] nvmet: add NVM Command Set Identifier support

Christoph Hellwig hch at lst.de
Thu Apr 8 08:15:17 BST 2021


s/NVM // in the subject.

> -static void nvmet_execute_get_log_cmd_effects_ns(struct nvmet_req *req)
> +static void nvmet_set_csi_nvm_effects(struct nvme_effects_log *log)

Maybe call this nvmet_get_cmd_effects_nvm?

> +static u16 nvmet_execute_identify_desclist_csi(struct nvmet_req *req, off_t *o)
> +{
> +	switch (req->ns->csi) {
> +	case NVME_CSI_NVM:
> +		return nvmet_copy_ns_identifier(req, NVME_NIDT_CSI,
> +						NVME_NIDT_CSI_LEN,
> +						&req->ns->csi, o);
> +	}
> +
> +	return NVME_SC_INVALID_IO_CMD_SET;

No need for a switch here, this can just copy the csi value in
the nvmet_ns structure (which also means that we probably don't
need this helper at all).

> +static inline bool nvmet_cc_css_check(u8 cc_css)

I'd call this nvmet_css_supported.



More information about the Linux-nvme mailing list