md: don't clear curr_resync_completed at end of resync.
There is no need to set this to zero at this point. It will be set to zero by remove_and_add_spares or at the start of md_do_sync at the latest. And setting it to zero before MD_RECOVERY_RUNNING is cleared can make a 'zero' appear briefly in the 'sync_completed' sysfs attribute just as resync is finishing. So simply remove this setting to zero. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
a8c42c7f47
commit
7281f8129c
@ -6984,9 +6984,6 @@ void md_do_sync(mddev_t *mddev)
|
|||||||
} else if (test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery))
|
} else if (test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery))
|
||||||
mddev->resync_min = mddev->curr_resync_completed;
|
mddev->resync_min = mddev->curr_resync_completed;
|
||||||
mddev->curr_resync = 0;
|
mddev->curr_resync = 0;
|
||||||
if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery))
|
|
||||||
mddev->curr_resync_completed = 0;
|
|
||||||
sysfs_notify(&mddev->kobj, NULL, "sync_completed");
|
|
||||||
wake_up(&resync_wait);
|
wake_up(&resync_wait);
|
||||||
set_bit(MD_RECOVERY_DONE, &mddev->recovery);
|
set_bit(MD_RECOVERY_DONE, &mddev->recovery);
|
||||||
md_wakeup_thread(mddev->thread);
|
md_wakeup_thread(mddev->thread);
|
||||||
|
Loading…
Reference in New Issue
Block a user