[PATCH] NVMe: allow discard timeouts to be configurable

Christoph Hellwig hch at infradead.org
Sat Apr 18 13:11:11 PDT 2015


>  static void nvme_set_info(struct nvme_cmd_info *cmd, void *ctx,
>  				nvme_completion_fn handler)
>  {
> +	struct request *rq = blk_mq_rq_from_pdu(cmd);
> +
>  	cmd->fn = handler;
>  	cmd->ctx = ctx;
>  	cmd->aborted = 0;
> -	blk_mq_start_request(blk_mq_rq_from_pdu(cmd));
> +
> +	if (rq->cmd_flags & REQ_DISCARD)
> +		rq->timeout = nvme_discard_timeout * HZ;
> +

Can you move this to the discard-specific branch of nvme_queue_rq
please?



More information about the Linux-nvme mailing list