[PATCH] Move merge skip until after the one-hit check

From: Alan D . Brunelle
Date: Thu Apr 24 2008 - 16:36:19 EST


This undoes patch 2/3, and moves the code to elv_merge after the one-hit
cache check.

Signed-off-by: Alan D. Brunelle <alan.brunelle@xxxxxx>
---
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


--------------000309010004070708030806--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/