Commit 12f03a49 authored by Kevin Corry's avatar Kevin Corry Committed by Linus Torvalds

[PATCH] device-mapper statistics: basic

Record basic I/O statistics for mapped devices.
Signed-off-by: default avatarKevin Corry <kevcorry@us.ibm.com>
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent dab6a429
...@@ -573,10 +573,14 @@ static void __split_bio(struct mapped_device *md, struct bio *bio) ...@@ -573,10 +573,14 @@ static void __split_bio(struct mapped_device *md, struct bio *bio)
static int dm_request(request_queue_t *q, struct bio *bio) static int dm_request(request_queue_t *q, struct bio *bio)
{ {
int r; int r;
int rw = bio_data_dir(bio);
struct mapped_device *md = q->queuedata; struct mapped_device *md = q->queuedata;
down_read(&md->io_lock); down_read(&md->io_lock);
disk_stat_inc(dm_disk(md), ios[rw]);
disk_stat_add(dm_disk(md), sectors[rw], bio_sectors(bio));
/* /*
* If we're suspended we have to queue * If we're suspended we have to queue
* this io for later. * this io for later.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment