This is a note to let you know that I've just added the patch titled
md/raid10: fix bug which causes all RAID10 reshapes to move no data.
to the 3.10-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-fix-bug-which-causes-all-raid10-reshapes-to-move-no-data.patch
and it can be found in the queue-3.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 1376512065b23f39d5f9a160948f313397dde972 Mon Sep 17 00:00:00 2001
From: NeilBrown <[email protected]>
Date: Thu, 4 Jul 2013 16:41:53 +1000
Subject: md/raid10: fix bug which causes all RAID10 reshapes to move no data.
From: NeilBrown <[email protected]>
commit 1376512065b23f39d5f9a160948f313397dde972 upstream.
The recent comment:
commit 7e83ccbecd608b971f340e951c9e84cd0343002f
md/raid10: Allow skipping recovery when clean arrays are assembled
Causes raid10 to skip a recovery in certain cases where it is safe to
do so. Unfortunately it also causes a reshape to be skipped which is
never safe. The result is that an attempt to reshape a RAID10 will
appear to complete instantly, but no data will have been moves so the
array will now contain garbage.
(If nothing is written, you can recovery by simple performing the
reverse reshape which will also complete instantly).
Bug was introduced in 3.10, so this is suitable for 3.10-stable.
Signed-off-by: NeilBrown <[email protected]>
Cc: Martin Wilck <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/md/raid10.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -2909,14 +2909,13 @@ static sector_t sync_request(struct mdde
*/
if (mddev->bitmap == NULL &&
mddev->recovery_cp == MaxSector &&
+ mddev->reshape_position == MaxSector &&
+ !test_bit(MD_RECOVERY_SYNC, &mddev->recovery) &&
!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) &&
+ !test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery) &&
conf->fullsync == 0) {
*skipped = 1;
- max_sector = mddev->dev_sectors;
- if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery) ||
- test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery))
- max_sector = mddev->resync_max_sectors;
- return max_sector - sector_nr;
+ return mddev->dev_sectors - sector_nr;
}
skipped:
Patches currently in stable-queue which might be from [email protected] are
queue-3.10/md-raid10-fix-two-problems-with-raid10-resync.patch
queue-3.10/md-raid10-fix-two-bugs-affecting-raid10-reshape.patch
queue-3.10/md-raid10-fix-bug-which-causes-all-raid10-reshapes-to-move-no-data.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