aboutsummaryrefslogtreecommitdiff
path: root/drivers/md/raid1.h
diff options
context:
space:
mode:
authorShaohua Li <shli@kernel.org>2012-07-31 10:03:53 +1000
committerNeilBrown <neilb@suse.de>2012-07-31 10:03:53 +1000
commitbe4d3280b17bc51f23ec6ebb345728f302f80a0c (patch)
tree1fc4e6d04fd57667b6b496ae6165d08f59405743 /drivers/md/raid1.h
parentcc4d1efdd017083bbcbaf23feb4cdc717fa7dab8 (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.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/md/raid1.h b/drivers/md/raid1.h
index 4e3613daaea..3770b4a2766 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.