* [PATCH 4/9] device-mapper statistics: basic
@ 2006-01-20 21:15 Alasdair G Kergon
0 siblings, 0 replies; only message in thread
From: Alasdair G Kergon @ 2006-01-20 21:15 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, Kevin Corry
From: Kevin Corry <kevcorry@us.ibm.com>
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>
Index: linux-2.6.16-rc1/drivers/md/dm.c
===================================================================
--- linux-2.6.16-rc1.orig/drivers/md/dm.c 2006-01-20 18:41:11.000000000 +0000
+++ linux-2.6.16-rc1/drivers/md/dm.c 2006-01-20 20:17:48.000000000 +0000
@@ -573,10 +573,14 @@ static void __split_bio(struct mapped_de
static int dm_request(request_queue_t *q, struct bio *bio)
{
int r;
+ int rw = bio_data_dir(bio);
struct mapped_device *md = q->queuedata;
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
* this io for later.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-01-20 21:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-20 21:15 [PATCH 4/9] device-mapper statistics: basic Alasdair G Kergon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).