aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorKevin Corry <kevcorry@us.ibm.com>2006-02-01 06:04:52 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-01 11:53:10 -0500
commit12f03a49cf0ab5e8511911142d28699499a572c4 (patch)
treeba20a069dae0d695d84326189d2e608b4e841ed5 /drivers/md
parentdab6a42915554f70220e5a2ff55c59c749582c7b (diff)
[PATCH] device-mapper statistics: basic
Record basic I/O statistics for mapped devices. Signed-off-by: Kevin Corry <kevcorry@us.ibm.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 8c16359f8b01..c47518386c91 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -573,10 +573,14 @@ static void __split_bio(struct mapped_device *md, struct bio *bio)
573static int dm_request(request_queue_t *q, struct bio *bio) 573static int dm_request(request_queue_t *q, struct bio *bio)
574{ 574{
575 int r; 575 int r;
576 int rw = bio_data_dir(bio);
576 struct mapped_device *md = q->queuedata; 577 struct mapped_device *md = q->queuedata;
577 578
578 down_read(&md->io_lock); 579 down_read(&md->io_lock);
579 580
581 disk_stat_inc(dm_disk(md), ios[rw]);
582 disk_stat_add(dm_disk(md), sectors[rw], bio_sectors(bio));
583
580 /* 584 /*
581 * If we're suspended we have to queue 585 * If we're suspended we have to queue
582 * this io for later. 586 * this io for later.