Skip to contentSkip to conversation

block: Remove judgement for rq_mergeable(rq) in func elv_rqhash_find.

PATCH In review majianpeng 2 participants 2 messages Jan 7, 2013 Block layer

lore
Share & tools
lore

majianpeng

author
#0 lore raw

PATCH 1/1 block: Remove judgement for rq_mergeable(rq) in func elv_rqhash_find.

Because only mergeable rq can add rqhash.So it does not make sense to judge rq_mergeable(rq) in func elv_rqhash_find.

---
 block/elevator.c |    5 -----
 1 file changed, 5 deletions(-)
block/elevator.c +0 -5
index 9edba1b..d5901a4 100644
@@ -273,11 +273,6 @@ static struct request *elv_rqhash_find(struct request_queue *q, sector_t offset)
 	hlist_for_each_entry_safe(rq, entry, next, hash_list, hash) {
 		BUG_ON(!ELV_ON_HASH(rq));
 
-		if (unlikely(!rq_mergeable(rq))) {
-			__elv_rqhash_del(rq);
-			continue;
-		}
-
 		if (rq_hash_key(rq) == offset)
 			return rq;
 	}
Signature · 1 line
1.7.9.5�翳簕.n�+壏煯壄�+%娝�遍荻w�簕.n�+壏{炳G珴�妠ay�蕠跈�,jf"穐殢飦�戧鐉_璁(殠娸"濟�m���G珴�⒏?櫒璀�&x忈秈O曟瑉窔v豝�m����鹅�⒏?朓�
maintainer
#1 lore raw
Quoted 2 lines · majianpeng

Because only mergeable rq can add rqhash.So it does not make sense to judge rq_mergeable(rq) in func elv_rqhash_find.

It does make sense. A request is always mergeable when it enters the hash, but it may not remain mergeable. This can happen if we merge it to its maximum size, for instance.

Signature · 1 line
Jens Axboe