mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[PATCH] device-mapper statistics: basic
Record basic I/O statistics for mapped devices. Signed-off-by: Kevin Corry <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
dab6a42915
commit
12f03a49cf
1 changed files with 4 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue