[PATCH v2] nvme: add vectored-io support for user-passthru

Christoph Hellwig hch at lst.de
Tue Feb 1 00:02:02 PST 2022


> +static int nvme_user_cmd64(struct nvme_ctrl *ctrl, struct nvme_ns *ns,
> +			struct nvme_passthru_cmd64 __user *ucmd)
> +{
> +	return nvme_user_cmd64_common(ctrl, ns, ucmd, false);
> +}
> +
> +static int nvme_user_cmd64_vec(struct nvme_ctrl *ctrl, struct nvme_ns *ns,
> +			struct nvme_passthru_cmd64 __user *ucmd)
> +{
> +	return nvme_user_cmd64_common(ctrl, ns, ucmd, true);
>  }

I think we cn skip these tiny wrappers.

>  static bool is_ctrl_ioctl(unsigned int cmd)
> @@ -341,6 +369,8 @@ static int nvme_ns_ioctl(struct nvme_ns *ns, unsigned int cmd,
>  		return nvme_submit_io(ns, argp);
>  	case NVME_IOCTL_IO64_CMD:
>  		return nvme_user_cmd64(ns->ctrl, ns, argp);
> +	case NVME_IOCTL_IO64_CMD_VEC:
> +		return nvme_user_cmd64_vec(ns->ctrl, ns, argp);

Maybe add a rationale why we don't need a new ioctl for admin
commands to the commit log.



More information about the Linux-nvme mailing list