From: NeilBrown Date: Wed, 19 Sep 2012 02:52:30 +0000 (+1000) Subject: md/raid5: fix calculate of 'degraded' when a replacement becomes active. X-Git-Tag: v3.6-rc7~29^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5c86471f933608db5d43679f84cb4346c32033e;p=pandora-kernel.git md/raid5: fix calculate of 'degraded' when a replacement becomes active. When a replacement device becomes active, we mark the device that it replaces as 'faulty' so that it can subsequently get removed. However 'calc_degraded' only pays attention to the primary device, not the replacement, so the array appears to become degraded, which is wrong. So teach 'calc_degraded' to consider any replacement if a primary device is faulty. This is suitable for -stable as an incorrect 'degraded' value can confuse md and could lead to data corruption. This is only relevant for 3.3 and later. Cc: stable@vger.kernel.org Reported-by: Robin Hill Reported-by: John Drescher Signed-off-by: NeilBrown --- Reading git-diff-tree failed