From: NeilBrown Date: Tue, 3 Jul 2012 01:46:53 +0000 (+1000) Subject: md/raid5: prefer replacing failed devices over want-replacement devices. X-Git-Tag: v3.5-rc6~24^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5cfb22a1f83e4f04c0a4df89b60053a077222e2b;p=pandora-kernel.git 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 Signed-off-by: NeilBrown --- Reading git-diff-tree failed