mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
cc4d1efdd0
commit
be4d3280b1
2 changed files with 12 additions and 34 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue