commit | 5cfb22a1f83e4f04c0a4df89b60053a077222e2b | [log] [tgz] |
---|---|---|
author | NeilBrown <neilb@suse.de> | Tue Jul 03 11:46:53 2012 +1000 |
committer | NeilBrown <neilb@suse.de> | Tue Jul 03 11:46:53 2012 +1000 |
tree | 9312c806fb3fb245beb0dd6669569f88a79a8b7d | |
parent | fc448a18ae6219af9a73257b1fbcd009efab4a81 [diff] |
md/raid5: prefer replacing failed devices over want-replacement devices. If a RAID5 has both a failed device and a device marked as 'WantReplacement', then we should preferentially replace the failed device. However the current code replaces whichever is found first. So split into 2 loops, check fail failed/missing first, and only check for WantReplacement if nothing is failed or missing. Reported-by: majianpeng <majianpeng@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>