[PATCH] blk-mq-sched: Enable merging discard bio into request

Jens Axboe axboe at kernel.dk
Thu Feb 1 13:45:44 PST 2018


On 2/1/18 2:41 PM, Keith Busch wrote:
> Signed-off-by: Keith Busch <keith.busch at intel.com>
> ---
>  block/blk-mq-sched.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
> index 55c0a745b427..25c14c58385c 100644
> --- a/block/blk-mq-sched.c
> +++ b/block/blk-mq-sched.c
> @@ -259,6 +259,8 @@ bool blk_mq_sched_try_merge(struct request_queue *q, struct bio *bio,
>  		if (!*merged_request)
>  			elv_merged_request(q, rq, ELEVATOR_FRONT_MERGE);
>  		return true;
> +	case ELEVATOR_DISCARD_MERGE:
> +		return bio_attempt_discard_merge(q, rq, bio);
>  	default:
>  		return false;

Thanks Keith, applied.

-- 
Jens Axboe




More information about the Linux-nvme mailing list