[PATCH 2/2] nvme: use driver pdu command for passthrough

Christoph Hellwig hch at lst.de
Wed Mar 17 06:47:06 GMT 2021


On Tue, Mar 16, 2021 at 10:06:32AM -0700, Keith Busch wrote:
> @@ -724,14 +727,6 @@ static void nvme_assign_write_stream(struct nvme_ctrl *ctrl,
>  		req->q->write_hints[streamid] += blk_rq_bytes(req) >> 9;
>  }
>  
> -static inline void nvme_setup_passthrough(struct request *req,
> -		struct nvme_command *cmd)
> -{
> -	memcpy(cmd, nvme_req(req)->cmd, sizeof(*cmd));
> -	/* passthru commands should let the driver set the SGL flags */
> -	cmd->common.flags &= ~NVME_CMD_SGL_ALL;
> -}

I think we need to keep the sanitization of common.flags here.

The rest looks good.



More information about the Linux-nvme mailing list