This is a note to let you know that I've just added the patch titled
md/raid10: Don't try to recovery unmatched (and unused) chunks.
to the 3.0-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
md-raid10-don-t-try-to-recovery-unmatched-and-unused-chunks.patch
and it can be found in the queue-3.0 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
From: NeilBrown <[email protected]>
Date: Tue, 3 Jul 2012 10:37:30 +1000
Subject: md/raid10: Don't try to recovery unmatched (and unused) chunks.
From: NeilBrown <[email protected]>
commit fc448a18ae6219af9a73257b1fbcd009efab4a81 upstream.
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.
Reported-by: Christian Balzer <[email protected]>
Tested-by: Christian Balzer <[email protected]>
Signed-off-by: NeilBrown <[email protected]>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/md/raid10.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -1858,6 +1858,12 @@ static sector_t sync_request(mddev_t *md
/* want to reconstruct this device */
rb2 = r10_bio;
sect = raid10_find_virt(conf, sector_nr, i);
+ if (sect >= mddev->resync_max_sectors) {
+ /* last stripe is not complete - don't
+ * try to recover this sector.
+ */
+ continue;
+ }
/* Unless we are doing a full sync, we only need
* to recover the block if it is set in the bitmap
*/
Patches currently in stable-queue which might be from [email protected] are
queue-3.0/raid5-delayed-stripe-fix.patch
queue-3.0/md-raid10-don-t-try-to-recovery-unmatched-and-unused-chunks.patch
queue-3.0/umem-fix-up-unplugging.patch
queue-3.0/md-raid5-do-not-add-data_offset-before-call-to-is_badblock.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html