>From afee0469c6dfc297cc81e38178193aaf0bd3b539 Mon Sep 17 00:00:00 2001 From: Alan D. Brunelle Date: Thu, 24 Apr 2008 16:36:19 -0400 Subject: [PATCH] Move merge skip until after the one-hit check This undoes patch 2/3, and moves the code to elv_merge after the one-hit cache check. Signed-off-by: Alan D. Brunelle --- block/blk-core.c | 2 +- block/elevator.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 54a2d8b..2a438a9 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1115,7 +1115,7 @@ static int __make_request(struct request_queue *q, struct bio *bio) spin_lock_irq(q->queue_lock); - if (blk_queue_nomerges(q) || unlikely(barrier) || elv_queue_empty(q)) + if (unlikely(barrier) || elv_queue_empty(q)) goto get_rq; el_ret = elv_merge(q, &req, bio); diff --git a/block/elevator.c b/block/elevator.c index 2a5e4be..557ee38 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -488,6 +488,9 @@ int elv_merge(struct request_queue *q, struct request **req, struct bio *bio) } } + if (blk_queue_nomerges(q)) + return ELEVATOR_NO_MERGE; + /* * See if our hash lookup can find a potential backmerge. */ -- 1.5.2.5