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

Keith Busch keith.busch at intel.com
Thu Feb 1 13:41:15 PST 2018


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;
 	}
-- 
2.14.3




More information about the Linux-nvme mailing list