aboutsummaryrefslogtreecommitdiff
path: root/net/lapb
diff options
context:
space:
mode:
authorTomáš Hodek <[email protected]>2015-02-23 11:00:38 +1100
committerNeilBrown <[email protected]>2015-02-25 11:37:02 +1100
commitd1901ef099c38afd11add4cfb3312c02ef21ec4a (patch)
tree75becab74c257df726f895e5dc477f2883cd34b9 /net/lapb
parentc517d838eb7d07bbe9507871fab3931deccff539 (diff)
md/raid1: fix read balance when a drive is write-mostly.
When a drive is marked write-mostly it should only be the target of reads if there is no other option. This behaviour was broken by commit 9dedf60313fa4dddfd5b9b226a0ef12a512bf9dc md/raid1: read balance chooses idlest disk for SSD which causes a write-mostly device to be *preferred* is some cases. Restore correct behaviour by checking and setting best_dist_disk and best_pending_disk rather than best_disk. We only need to test one of these as they are both changed from -1 or >=0 at the same time. As we leave min_pending and best_dist unchanged, any non-write-mostly device will appear better than the write-mostly device. Reported-by: Tomáš Hodek <[email protected]> Reported-by: Dark Penguin <[email protected]> Signed-off-by: NeilBrown <[email protected]> Link: http://marc.info/?l=linux-raid&m=135982797322422 Fixes: 9dedf60313fa4dddfd5b9b226a0ef12a512bf9dc Cc: [email protected] (3.6+)
Diffstat (limited to 'net/lapb')
0 files changed, 0 insertions, 0 deletions