Commit 6bee5825 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  md/raid5: make sure curr_sync_completes is uptodate when reshape starts
  md: don't clear endpoint for resync when resync is interrupted.
parents d178f27f 8dee7211
...@@ -6504,7 +6504,8 @@ void md_do_sync(mddev_t *mddev) ...@@ -6504,7 +6504,8 @@ void md_do_sync(mddev_t *mddev)
skip: skip:
mddev->curr_resync = 0; mddev->curr_resync = 0;
mddev->curr_resync_completed = 0; mddev->curr_resync_completed = 0;
mddev->resync_min = 0; if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery))
/* We completed so max setting can be forgotten. */
mddev->resync_max = MaxSector; mddev->resync_max = MaxSector;
sysfs_notify(&mddev->kobj, NULL, "sync_completed"); sysfs_notify(&mddev->kobj, NULL, "sync_completed");
wake_up(&resync_wait); wake_up(&resync_wait);
......
...@@ -4049,6 +4049,8 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped ...@@ -4049,6 +4049,8 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped
sector_nr = conf->reshape_progress; sector_nr = conf->reshape_progress;
sector_div(sector_nr, new_data_disks); sector_div(sector_nr, new_data_disks);
if (sector_nr) { if (sector_nr) {
mddev->curr_resync_completed = sector_nr;
sysfs_notify(&mddev->kobj, NULL, "sync_completed");
*skipped = 1; *skipped = 1;
return sector_nr; return sector_nr;
} }
......
Markdown is supported
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