md/raid5: Fix possible confusion when multiple write errors occur.
commit
3243fd054b61a542fefc5c01a991b37c071ac7ed
md: raid5 crash during degradation
Fixed a crash in an overly simplistic way which could leave
R5_WriteError or R5_MadeGood set in the stripe cache for devices
for which it is no longer relevant.
When those devices are removed and spares added the flags are still
set and can cause incorrect behaviour.
commit
7802ce65fd818b1ebb87c5b8ebc8fdd3767e005c
md/raid5: preferentially read from replacement device if possible.
Fixed the same bug if a more effective way, so we can now revert
the original commit.
Reported-and-tested-by: Alexander Lyakas <alex.bolshoy@gmail.com>
Cc: stable@vger.kernel.org (3.2+ - 3.2 will need a different fix though)
Fixes: 3243fd054b61a542fefc5c01a991b37c071ac7ed
Signed-off-by: NeilBrown <neilb@suse.de>