diff options
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r-- | block/cfq-iosched.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 5617ae030b15..4eb1906cf6c6 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -1467,6 +1467,14 @@ static void cfq_merged_request(struct request_queue *q, struct request *req, | |||
1467 | } | 1467 | } |
1468 | } | 1468 | } |
1469 | 1469 | ||
1470 | static void cfq_bio_merged(struct request_queue *q, struct request *req, | ||
1471 | struct bio *bio) | ||
1472 | { | ||
1473 | struct cfq_queue *cfqq = RQ_CFQQ(req); | ||
1474 | blkiocg_update_io_merged_stats(&cfqq->cfqg->blkg, bio_data_dir(bio), | ||
1475 | cfq_bio_sync(bio)); | ||
1476 | } | ||
1477 | |||
1470 | static void | 1478 | static void |
1471 | cfq_merged_requests(struct request_queue *q, struct request *rq, | 1479 | cfq_merged_requests(struct request_queue *q, struct request *rq, |
1472 | struct request *next) | 1480 | struct request *next) |
@@ -1484,6 +1492,8 @@ cfq_merged_requests(struct request_queue *q, struct request *rq, | |||
1484 | if (cfqq->next_rq == next) | 1492 | if (cfqq->next_rq == next) |
1485 | cfqq->next_rq = rq; | 1493 | cfqq->next_rq = rq; |
1486 | cfq_remove_request(next); | 1494 | cfq_remove_request(next); |
1495 | blkiocg_update_io_merged_stats(&cfqq->cfqg->blkg, rq_data_dir(next), | ||
1496 | rq_is_sync(next)); | ||
1487 | } | 1497 | } |
1488 | 1498 | ||
1489 | static int cfq_allow_merge(struct request_queue *q, struct request *rq, | 1499 | static int cfq_allow_merge(struct request_queue *q, struct request *rq, |
@@ -3861,6 +3871,7 @@ static struct elevator_type iosched_cfq = { | |||
3861 | .elevator_merged_fn = cfq_merged_request, | 3871 | .elevator_merged_fn = cfq_merged_request, |
3862 | .elevator_merge_req_fn = cfq_merged_requests, | 3872 | .elevator_merge_req_fn = cfq_merged_requests, |
3863 | .elevator_allow_merge_fn = cfq_allow_merge, | 3873 | .elevator_allow_merge_fn = cfq_allow_merge, |
3874 | .elevator_bio_merged_fn = cfq_bio_merged, | ||
3864 | .elevator_dispatch_fn = cfq_dispatch_requests, | 3875 | .elevator_dispatch_fn = cfq_dispatch_requests, |
3865 | .elevator_add_req_fn = cfq_insert_request, | 3876 | .elevator_add_req_fn = cfq_insert_request, |
3866 | .elevator_activate_req_fn = cfq_activate_request, | 3877 | .elevator_activate_req_fn = cfq_activate_request, |