aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/md.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index e64c971038d1..01b9a0fd16e0 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1382,8 +1382,6 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev)
1382 1382
1383 if (rdev->raid_disk >= 0 && 1383 if (rdev->raid_disk >= 0 &&
1384 !test_bit(In_sync, &rdev->flags)) { 1384 !test_bit(In_sync, &rdev->flags)) {
1385 if (mddev->curr_resync_completed > rdev->recovery_offset)
1386 rdev->recovery_offset = mddev->curr_resync_completed;
1387 if (rdev->recovery_offset > 0) { 1385 if (rdev->recovery_offset > 0) {
1388 sb->feature_map |= 1386 sb->feature_map |=
1389 cpu_to_le32(MD_FEATURE_RECOVERY_OFFSET); 1387 cpu_to_le32(MD_FEATURE_RECOVERY_OFFSET);
@@ -1917,6 +1915,14 @@ static void sync_sbs(mddev_t * mddev, int nospares)
1917 */ 1915 */
1918 mdk_rdev_t *rdev; 1916 mdk_rdev_t *rdev;
1919 1917
1918 /* First make sure individual recovery_offsets are correct */
1919 list_for_each_entry(rdev, &mddev->disks, same_set) {
1920 if (rdev->raid_disk >= 0 &&
1921 !test_bit(In_sync, &rdev->flags) &&
1922 mddev->curr_resync_completed > rdev->recovery_offset)
1923 rdev->recovery_offset = mddev->curr_resync_completed;
1924
1925 }
1920 list_for_each_entry(rdev, &mddev->disks, same_set) { 1926 list_for_each_entry(rdev, &mddev->disks, same_set) {
1921 if (rdev->sb_events == mddev->events || 1927 if (rdev->sb_events == mddev->events ||
1922 (nospares && 1928 (nospares &&