Skip to content
Commit e5c86471 authored by NeilBrown's avatar NeilBrown
Browse files

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: default avatarRobin Hill <robin@robinhill.me.uk>
Reported-by: default avatarJohn Drescher <drescherjm@gmail.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent a852d7b8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment