diff options
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 637806695bb9..327de03a5bdf 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -381,10 +381,10 @@ static void start_io_acct(struct dm_io *io) | |||
381 | 381 | ||
382 | io->start_time = jiffies; | 382 | io->start_time = jiffies; |
383 | 383 | ||
384 | cpu = disk_stat_lock(); | 384 | cpu = part_stat_lock(); |
385 | disk_round_stats(cpu, dm_disk(md)); | 385 | part_round_stats(cpu, &dm_disk(md)->part0); |
386 | disk_stat_unlock(); | 386 | part_stat_unlock(); |
387 | dm_disk(md)->in_flight = atomic_inc_return(&md->pending); | 387 | dm_disk(md)->part0.in_flight = atomic_inc_return(&md->pending); |
388 | } | 388 | } |
389 | 389 | ||
390 | static int end_io_acct(struct dm_io *io) | 390 | static int end_io_acct(struct dm_io *io) |
@@ -395,12 +395,13 @@ static int end_io_acct(struct dm_io *io) | |||
395 | int pending, cpu; | 395 | int pending, cpu; |
396 | int rw = bio_data_dir(bio); | 396 | int rw = bio_data_dir(bio); |
397 | 397 | ||
398 | cpu = disk_stat_lock(); | 398 | cpu = part_stat_lock(); |
399 | disk_round_stats(cpu, dm_disk(md)); | 399 | part_round_stats(cpu, &dm_disk(md)->part0); |
400 | disk_stat_add(cpu, dm_disk(md), ticks[rw], duration); | 400 | part_stat_add(cpu, &dm_disk(md)->part0, ticks[rw], duration); |
401 | disk_stat_unlock(); | 401 | part_stat_unlock(); |
402 | 402 | ||
403 | dm_disk(md)->in_flight = pending = atomic_dec_return(&md->pending); | 403 | dm_disk(md)->part0.in_flight = pending = |
404 | atomic_dec_return(&md->pending); | ||
404 | 405 | ||
405 | return !pending; | 406 | return !pending; |
406 | } | 407 | } |
@@ -899,10 +900,10 @@ static int dm_request(struct request_queue *q, struct bio *bio) | |||
899 | 900 | ||
900 | down_read(&md->io_lock); | 901 | down_read(&md->io_lock); |
901 | 902 | ||
902 | cpu = disk_stat_lock(); | 903 | cpu = part_stat_lock(); |
903 | disk_stat_inc(cpu, dm_disk(md), ios[rw]); | 904 | part_stat_inc(cpu, &dm_disk(md)->part0, ios[rw]); |
904 | disk_stat_add(cpu, dm_disk(md), sectors[rw], bio_sectors(bio)); | 905 | part_stat_add(cpu, &dm_disk(md)->part0, sectors[rw], bio_sectors(bio)); |
905 | disk_stat_unlock(); | 906 | part_stat_unlock(); |
906 | 907 | ||
907 | /* | 908 | /* |
908 | * If we're suspended we have to queue | 909 | * If we're suspended we have to queue |