From a362357b6cd62643d4dda3b152639303d78473da Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 1 Nov 2005 09:26:16 +0100 Subject: [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 --- drivers/md/md.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/md/md.c') 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) idle = 1; ITERATE_RDEV(mddev,rdev,tmp) { struct gendisk *disk = rdev->bdev->bd_contains->bd_disk; - curr_events = disk_stat_read(disk, read_sectors) + - disk_stat_read(disk, write_sectors) - + curr_events = disk_stat_read(disk, sectors[0]) + + disk_stat_read(disk, sectors[1]) - atomic_read(&disk->sync_io); /* Allow some slack between valud of curr_events and last_events, * as there are some uninteresting races. -- cgit v1.2.2