[PATCH] nvme: return the whole CQE through the request passthrough interface

Matias Bjørling m at bjorling.me
Mon Feb 8 11:47:42 PST 2016


>   		req = blk_mq_tag_to_rq(*nvmeq->tags, cqe.command_id);
> -		if (req->cmd_type == REQ_TYPE_DRV_PRIV) {
> -			u32 result = le32_to_cpu(cqe.result);
> -			req->special = (void *)(uintptr_t)result;
> -		}
> +		if (req->cmd_type == REQ_TYPE_DRV_PRIV && req->special)
> +			memcpy(req->special, &cqe, sizeof(cqe));

Thanks for sending the patch.

When LightNVM send asynchronous data commands, it would need to allocate 
extra memory for cqe. Would it make sense to pass cqe directly and 
assume that it is live through the blk_mq_complete_request call?



More information about the Linux-nvme mailing list