[PATCH 1/2] nvme: introduce struct nvme_request
Sagi Grimberg
sagi at grimberg.me
Thu Oct 27 02:24:24 PDT 2016
> +/*
> + * Common request structure for NVMe passthrough. All drivers must have
> + * this structure as the first member of their request-private data.
> + */
> +struct nvme_request {
> + struct nvme_command *cmd;
> + union nvme_result result;
> +};
I sorta agree with James, can we not enforce a "hidden assumption"
of the core on how the transport drivers structures are built?
> +
> +static inline struct nvme_request *nvme_req(struct request *req)
> +{
> + return blk_mq_rq_to_pdu(req);
> +}
Maybe this can be a ctrl->ops->nvme_req() instead?
More information about the Linux-nvme
mailing list