-
由 NeilBrown 提交于
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: NRobin Hill <robin@robinhill.me.uk> Reported-by: NJohn Drescher <drescherjm@gmail.com> Signed-off-by: NNeilBrown <neilb@suse.de>
e5c86471