summaryrefslogtreecommitdiff
path: root/block/blk-merge.c
diff options
context:
space:
mode:
authorJerome Marchand <jmarchan@redhat.com>2008-02-08 11:04:35 +0100
committerJens Axboe <jens.axboe@oracle.com>2008-02-08 12:41:56 +0100
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,
elv_merge_requests(q, req, next);
if (req->rq_disk) {
+ struct hd_struct *part
+ = get_part(req->rq_disk, req->sector);
disk_round_stats(req->rq_disk);
req->rq_disk->in_flight--;
+ if (part) {
+ part_round_stats(part);
+ part->in_flight--;
+ }
}
req->ioprio = ioprio_best(req->ioprio, next->ioprio);