aboutsummaryrefslogtreecommitdiffstats
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r--block/cfq-iosched.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index f3b44c394e6d..163263ddd381 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -1656,6 +1656,8 @@ cfq_merged_requests(struct request_queue *q, struct request *rq,
1656 struct request *next) 1656 struct request *next)
1657{ 1657{
1658 struct cfq_queue *cfqq = RQ_CFQQ(rq); 1658 struct cfq_queue *cfqq = RQ_CFQQ(rq);
1659 struct cfq_data *cfqd = q->elevator->elevator_data;
1660
1659 /* 1661 /*
1660 * reposition in fifo if next is older than rq 1662 * reposition in fifo if next is older than rq
1661 */ 1663 */
@@ -1670,6 +1672,16 @@ cfq_merged_requests(struct request_queue *q, struct request *rq,
1670 cfq_remove_request(next); 1672 cfq_remove_request(next);
1671 cfq_blkiocg_update_io_merged_stats(&(RQ_CFQG(rq))->blkg, 1673 cfq_blkiocg_update_io_merged_stats(&(RQ_CFQG(rq))->blkg,
1672 rq_data_dir(next), rq_is_sync(next)); 1674 rq_data_dir(next), rq_is_sync(next));
1675
1676 cfqq = RQ_CFQQ(next);
1677 /*
1678 * all requests of this queue are merged to other queues, delete it
1679 * from the service tree. If it's the active_queue,
1680 * cfq_dispatch_requests() will choose to expire it or do idle
1681 */
1682 if (cfq_cfqq_on_rr(cfqq) && RB_EMPTY_ROOT(&cfqq->sort_list) &&
1683 cfqq != cfqd->active_queue)
1684 cfq_del_cfqq_rr(cfqd, cfqq);
1673} 1685}
1674 1686
1675static int cfq_allow_merge(struct request_queue *q, struct request *rq, 1687static int cfq_allow_merge(struct request_queue *q, struct request *rq,