aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-merge.c
diff options
context:
space:
mode:
authorJerome Marchand <jmarchan@redhat.com>2008-02-08 05:04:35 -0500
committerJens Axboe <jens.axboe@oracle.com>2008-02-08 06:41:56 -0500
commit6f2576af5ba5913538fda7dfb7c6a17771025477 (patch)
treeff55bc30686ccec8b0ce22eb3844e78a52aea875 /block/blk-merge.c
parentea5c48ab2a76559d4af39e1f7de137c0851ac0a5 (diff)
Enhanced partition statistics: update partition statitics
Updates the enhanced partition statistics in generic block layer besides the disk statistics. Signed-off-by: Jerome Marchand <jmarchan@redhat.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r--block/blk-merge.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 845ef8131108..d3b84bbb776a 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -454,8 +454,14 @@ static int attempt_merge(struct request_queue *q, struct request *req,
454 elv_merge_requests(q, req, next); 454 elv_merge_requests(q, req, next);
455 455
456 if (req->rq_disk) { 456 if (req->rq_disk) {
457 struct hd_struct *part
458 = get_part(req->rq_disk, req->sector);
457 disk_round_stats(req->rq_disk); 459 disk_round_stats(req->rq_disk);
458 req->rq_disk->in_flight--; 460 req->rq_disk->in_flight--;
461 if (part) {
462 part_round_stats(part);
463 part->in_flight--;
464 }
459 } 465 }
460 466
461 req->ioprio = ioprio_best(req->ioprio, next->ioprio); 467 req->ioprio = ioprio_best(req->ioprio, next->ioprio);