[PATCH] Do not use rqhash when merges disabled
From: Alan D . Brunelle
Date: Wed Apr 23 2008 - 08:50:22 EST
Signed-off-by: Alan D. Brunelle <alan.brunelle@xxxxxx>
---
block/elevator.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/elevator.c b/block/elevator.c
index 88318c3..2ea5fb4 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -313,7 +313,7 @@ static inline void __elv_rqhash_del(struct request *rq)
static void elv_rqhash_del(struct request_queue *q, struct request *rq)
{
- if (ELV_ON_HASH(rq))
+ if (!blk_queue_nomerges(q) && ELV_ON_HASH(rq))
__elv_rqhash_del(rq);
}
@@ -601,7 +601,7 @@ void elv_insert(struct request_queue *q, struct request *rq, int where)
BUG_ON(!blk_fs_request(rq));
rq->cmd_flags |= REQ_SORTED;
q->nr_sorted++;
- if (rq_mergeable(rq)) {
+ if (!blk_queue_nomerges(q) && rq_mergeable(rq)) {
elv_rqhash_add(q, rq);
if (!q->last_merge)
q->last_merge = rq;
--
1.5.2.5
--------------070506070209020700040001--
--
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/