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

md/raid10: Don't try to recovery unmatched (and unused) chunks.



If a RAID10 has an odd number of chunks - as might happen when there
are an odd number of devices - the last chunk has no pair and so is
not mirrored.  We don't store data there, but when recovering the last
device in an array we retry to recover that last chunk from a
non-existent location.  This results in an error, and the recovery
aborts.

When we get to that last chunk we should just stop - there is nothing
more to do anyway.

This bug has been present since the introduction of RAID10, so the
patch is appropriate for any -stable kernel.

Cc: stable@vger.kernel.org
Reported-by: default avatarChristian Balzer <chibi@gol.com>
Tested-by: default avatarChristian Balzer <chibi@gol.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent 6b16351a
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