aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2005-11-01 03:26:16 -0500
committerJens Axboe <axboe@suse.de>2005-11-01 03:26:16 -0500
commita362357b6cd62643d4dda3b152639303d78473da (patch)
treefe4ce823e638ded151edcb142f28a240860f0d33 /drivers/md/md.c
parentd72d904a5367ad4ca3f2c9a2ce8c3a68f0b28bf0 (diff)
[BLOCK] Unify the seperate read/write io stat fields into arrays
Instead of having ->read_sectors and ->write_sectors, combine the two into ->sectors[2] and similar for the other fields. This saves a branch several places in the io path, since we don't have to care for what the actual io direction is. On my x86-64 box, that's 200 bytes less text in just the core (not counting the various drivers). Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 2a8a5696bf8a..9ecf51ee596f 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3466,8 +3466,8 @@ static int is_mddev_idle(mddev_t *mddev)
3466 idle = 1; 3466 idle = 1;
3467 ITERATE_RDEV(mddev,rdev,tmp) { 3467 ITERATE_RDEV(mddev,rdev,tmp) {
3468 struct gendisk *disk = rdev->bdev->bd_contains->bd_disk; 3468 struct gendisk *disk = rdev->bdev->bd_contains->bd_disk;
3469 curr_events = disk_stat_read(disk, read_sectors) + 3469 curr_events = disk_stat_read(disk, sectors[0]) +
3470 disk_stat_read(disk, write_sectors) - 3470 disk_stat_read(disk, sectors[1]) -
3471 atomic_read(&disk->sync_io); 3471 atomic_read(&disk->sync_io);
3472 /* Allow some slack between valud of curr_events and last_events, 3472 /* Allow some slack between valud of curr_events and last_events,
3473 * as there are some uninteresting races. 3473 * as there are some uninteresting races.