md/raid1: clean up read_balance.
authorNeilBrown <neilb@suse.de>
Wed, 11 May 2011 04:34:56 +0000 (14:34 +1000)
committerNeilBrown <neilb@suse.de>
Wed, 11 May 2011 04:34:56 +0000 (14:34 +1000)
commit76073054c95b12af6bd0cc9b9462a265b45ba38f
tree78f830289dd8bb5337a7d3efa442ae44abd4dbab
parent56d9912106b0974ffb6dd264c80c7e816677e998
md/raid1: clean up read_balance.

read_balance has two loops which both look for a 'best'
device based on slightly different criteria.
This is clumsy and makes is hard to add extra criteria.

So replace it all with a single loop that combines everything.

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