Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285119
b: refs/heads/master
c: 4a0b75c
h: refs/heads/master
i:
  285117: e95cc15
  285115: 5d98268
  285111: e2319ed
  285103: ae2da98
  285087: 8f85c23
  285055: cb71898
v: v3
  • Loading branch information
Shaohua Li authored and Jens Axboe committed Dec 16, 2011
1 parent bb5af53 commit a467fa9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f1f8cc94651738b418ba54c039df536303b91704
refs/heads/master: 4a0b75c7d02c2bd46ed227d4ba5941ba8a0aba5d
12 changes: 12 additions & 0 deletions trunk/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,8 @@ cfq_merged_requests(struct request_queue *q, struct request *rq,
struct request *next)
{
struct cfq_queue *cfqq = RQ_CFQQ(rq);
struct cfq_data *cfqd = q->elevator->elevator_data;

/*
* reposition in fifo if next is older than rq
*/
Expand All @@ -1670,6 +1672,16 @@ cfq_merged_requests(struct request_queue *q, struct request *rq,
cfq_remove_request(next);
cfq_blkiocg_update_io_merged_stats(&(RQ_CFQG(rq))->blkg,
rq_data_dir(next), rq_is_sync(next));

cfqq = RQ_CFQQ(next);
/*
* all requests of this queue are merged to other queues, delete it
* from the service tree. If it's the active_queue,
* cfq_dispatch_requests() will choose to expire it or do idle
*/
if (cfq_cfqq_on_rr(cfqq) && RB_EMPTY_ROOT(&cfqq->sort_list) &&
cfqq != cfqd->active_queue)
cfq_del_cfqq_rr(cfqd, cfqq);
}

static int cfq_allow_merge(struct request_queue *q, struct request *rq,
Expand Down

0 comments on commit a467fa9

Please sign in to comment.