]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid1: fix bug in read_balance introduced by hot-replace
authorNeilBrown <neilb@suse.de>
Tue, 3 Jul 2012 05:58:42 +0000 (15:58 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 3 Jul 2012 05:58:42 +0000 (15:58 +1000)
commit7aa657f26f3c0f22fa6c4c7bd7826f92c7d40627
tree10c55615d0edcb34af0dd2b9d1cdf09cbf34b45d
parent29ab73543fdc4743d8b3e63fac8f2b0a4eeea720
md/raid1: fix bug in read_balance introduced by hot-replace

When we added hot_replace we doubled the number of devices
that could be in a RAID1 array.  So we doubled how far read_balance
would search.  Unfortunately we didn't double the point at which
it looped back to the beginning - so it effectively loops over
all non-replacement disks twice.
This doesn't cause bad behaviour, but it pointless and means we
never read from replacement devices.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid1.c