diff options
author | kernelmail <kedacomkernel@gmail.com> | 2012-10-30 20:59:10 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-12-13 00:41:01 -0500 |
commit | 35d78c66969fbbb51046e9f251849cf54e9ed88c (patch) | |
tree | 283ad99a530bc52d81487f1b188837d011124c87 /drivers/md/md.c | |
parent | c02c0aeb6c728e5ad705dba86784bd553cb6f059 (diff) |
md:Add place to update ->recovery_cp.
In resyncing, recovery_cp only updated when resync aborted or completed.
But in md drives,many place used it to judge.So add a place to update.
Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 520056a88739..f97083476475 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -7462,6 +7462,9 @@ void md_do_sync(struct md_thread *thread) | |||
7462 | wait_event(mddev->recovery_wait, | 7462 | wait_event(mddev->recovery_wait, |
7463 | atomic_read(&mddev->recovery_active) == 0); | 7463 | atomic_read(&mddev->recovery_active) == 0); |
7464 | mddev->curr_resync_completed = j; | 7464 | mddev->curr_resync_completed = j; |
7465 | if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery) && | ||
7466 | j > mddev->recovery_cp) | ||
7467 | mddev->recovery_cp = j; | ||
7465 | set_bit(MD_CHANGE_CLEAN, &mddev->flags); | 7468 | set_bit(MD_CHANGE_CLEAN, &mddev->flags); |
7466 | sysfs_notify(&mddev->kobj, NULL, "sync_completed"); | 7469 | sysfs_notify(&mddev->kobj, NULL, "sync_completed"); |
7467 | } | 7470 | } |