blk-mq: remove unused function hctx_allow_merges
PATCH 1/1 blk-mq: remove unused function hctx_allow_merges
since 9bddeb2a5b981 "blk-mq: make per-sw-queue bio merge as default .bio_merge" there is no caller for this function.
--- block/blk-mq.c | 6 ------ 1 file changed, 6 deletions(-)
block/blk-mq.c +0 -6
@@ -1484,12 +1484,6 @@ static void blk_mq_bio_to_request(struct request *rq, struct bio *bio)blk_account_io_start (rq, true); } -static inline bool hctx_allow_merges (struct blk_mq_hw_ctx *hctx) -{ -return (hctx->flags &BLK_MQ_F_SHOULD_MERGE ) && - !blk_queue_nomerges (hctx->queue); -} -static inline void blk_mq_queue_io (struct blk_mq_hw_ctx *hctx,struct blk_mq_ctx *ctx,struct request *rq)
Signature · 1 line
2.9.4
Quoted 4 lines · weiping zhang
since
9bddeb2a5b981"blk-mq: make per-sw-queue bio merge as default .bio_merge" there is no caller for this function.Signed-off-by weiping zhang <[email protected]>
Signature · 1 line
Ming Lei
Jens Axboe
maintainerQuoted 2 lines · weiping zhang
since
9bddeb2a5b981"blk-mq: make per-sw-queue bio merge as default .bio_merge" there is no caller for this function.
Looks like this should change the new check to actually use this function instead, or we will be doing merges if someone has turned off merging through the sysfs 'nomerges' function.
block/blk-mq-sched.c +7 -1
@@ -224,6 +224,12 @@ static bool blk_mq_attempt_merge(struct request_queue *q,return false; } +static inline bool hctx_allow_merges (struct blk_mq_hw_ctx *hctx) +{ +return (hctx->flags &BLK_MQ_F_SHOULD_MERGE ) && + !blk_queue_nomerges (hctx->queue); +} +bool __blk_mq_sched_bio_merge (struct request_queue *q,struct bio *bio) {struct elevator_queue *e = q->elevator;
@@ -236,7 +242,7 @@ bool __blk_mq_sched_bio_merge(struct request_queue *q, struct bio *bio)return e->type->ops.mq.bio_merge (hctx, bio); } -if (hctx->flags &BLK_MQ_F_SHOULD_MERGE ) { +if (hctx_allow_merges (hctx)) {/* default per sw-queue merge */ spin_lock (&ctx->lock); ret =blk_mq_attempt_merge (q, ctx, bio);
block/blk-mq.c +0 -6
@@ -1504,12 +1504,6 @@ static void blk_mq_bio_to_request(struct request *rq, struct bio *bio)blk_account_io_start (rq, true); } -static inline bool hctx_allow_merges (struct blk_mq_hw_ctx *hctx) -{ -return (hctx->flags &BLK_MQ_F_SHOULD_MERGE ) && - !blk_queue_nomerges (hctx->queue); -} -static inline void blk_mq_queue_io (struct blk_mq_hw_ctx *hctx,struct blk_mq_ctx *ctx,struct request *rq)
Signature · 1 line
Jens Axboe
Jens Axboe
maintainerQuoted 7 lines · Jens Axboe
Quoted 2 lines · weiping zhang
since
9bddeb2a5b981"blk-mq: make per-sw-queue bio merge as default .bio_merge" there is no caller for this function.Looks like this should change the new check to actually use this function instead, or we will be doing merges if someone has turned off merging through the sysfs 'nomerges' function.
Actually, looks like the caller does that now, so the patch was actually fine.
Signature · 1 line
Jens Axboe