diff options
author | Shaohua Li <shli@kernel.org> | 2012-07-31 10:03:53 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-07-31 10:03:53 +1000 |
commit | be4d3280b17bc51f23ec6ebb345728f302f80a0c (patch) | |
tree | 1fc4e6d04fd57667b6b496ae6165d08f59405743 /drivers/md/raid1.h | |
parent | cc4d1efdd017083bbcbaf23feb4cdc717fa7dab8 (diff) |
md/raid1: make sequential read detection per disk based
Currently the sequential read detection is global wide. It's natural to make it
per disk based, which can improve the detection for concurrent multiple
sequential reads. And next patch will make SSD read balance not use distance
based algorithm, where this change help detect truly sequential read for SSD.
Signed-off-by: Shaohua Li <shli@fusionio.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid1.h')
-rw-r--r-- | drivers/md/raid1.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/md/raid1.h b/drivers/md/raid1.h index 4e3613daaea2..3770b4a27662 100644 --- a/drivers/md/raid1.h +++ b/drivers/md/raid1.h @@ -4,6 +4,11 @@ struct raid1_info { struct md_rdev *rdev; sector_t head_position; + + /* When choose the best device for a read (read_balance()) + * we try to keep sequential reads one the same device + */ + sector_t next_seq_sect; }; /* @@ -29,12 +34,6 @@ struct r1conf { */ int raid_disks; - /* When choose the best device for a read (read_balance()) - * we try to keep sequential reads one the same device - * using 'last_used' and 'next_seq_sect' - */ - int last_used; - sector_t next_seq_sect; /* During resync, read_balancing is only allowed on the part * of the array that has been resynced. 'next_resync' tells us * where that is. |