aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/md.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index a08aa582925b..d79a40649799 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -6381,6 +6381,7 @@ void md_do_sync(mddev_t *mddev)
6381 desc, mdname(mddev)); 6381 desc, mdname(mddev));
6382 mddev->curr_resync = j; 6382 mddev->curr_resync = j;
6383 } 6383 }
6384 mddev->curr_resync_completed = mddev->curr_resync;
6384 6385
6385 while (j < max_sectors) { 6386 while (j < max_sectors) {
6386 sector_t sectors; 6387 sector_t sectors;
@@ -6532,7 +6533,8 @@ void md_do_sync(mddev_t *mddev)
6532 } else if (test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) 6533 } else if (test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery))
6533 mddev->resync_min = mddev->curr_resync_completed; 6534 mddev->resync_min = mddev->curr_resync_completed;
6534 mddev->curr_resync = 0; 6535 mddev->curr_resync = 0;
6535 mddev->curr_resync_completed = 0; 6536 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery))
6537 mddev->curr_resync_completed = 0;
6536 sysfs_notify(&mddev->kobj, NULL, "sync_completed"); 6538 sysfs_notify(&mddev->kobj, NULL, "sync_completed");
6537 wake_up(&resync_wait); 6539 wake_up(&resync_wait);
6538 set_bit(MD_RECOVERY_DONE, &mddev->recovery); 6540 set_bit(MD_RECOVERY_DONE, &mddev->recovery);