diff options
author | NeilBrown <neilb@suse.de> | 2012-09-19 04:52:30 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-09-19 04:52:30 +0200 |
commit | e5c86471f933608db5d43679f84cb4346c32033e (patch) | |
tree | e596b35a134b9cc4e308f90090ecf9998a5b58a4 /drivers/md/md.c | |
parent | Revert "md/raid5: For odirect-write performance, do not set STRIPE_PREREAD_AC... (diff) | |
download | linux-e5c86471f933608db5d43679f84cb4346c32033e.tar.xz linux-e5c86471f933608db5d43679f84cb4346c32033e.zip |
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 <robin@robinhill.me.uk>
Reported-by: John Drescher <drescherjm@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions