md:Add place to update ->recovery_cp.
PATCH 1/1 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 <[email protected]>
--- drivers/md/md.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/md/md.c +3 -0
@@ -7454,6 +7454,9 @@ void md_do_sync(struct md_thread *thread)wait_event (mddev->recovery_wait,atomic_read (&mddev->recovery_active) ==0 ); mddev->curr_resync_completed = j; +if (test_bit (MD_RECOVERY_SYNC , &mddev->recovery) && + (j > mddev->recovery_cp)) + mddev->recovery_cp = j;set_bit (MD_CHANGE_CLEAN , &mddev->flags);sysfs_notify (&mddev->kobj,NULL ,"sync_completed" ); }
Signature · 1 line
1.7.9.5
NeilBrown
AppliedQuoted 13 lines · On Mon, 29 Oct 2012 09:51:25 +0800 kernelmail <[email protected]> wrote:
In resyncing,
recovery_cponly 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 <[email protected]>--- drivers/md/md.c | 3 +++ 1 file changed, 3 insertions(+)drivers/md/md.c +0
-0
drivers/md/md.c void md_do_sync(struct md_thread *thread) · line 7462
Quoted 9 lines
drivers/md/md.c +3
-0@@ -7454,6 +7454,9 @@ void md_do_sync(struct md_thread *thread)wait_event (mddev->recovery_wait,atomic_read (&mddev->recovery_active) ==0 ); mddev->curr_resync_completed = j; +if (test_bit (MD_RECOVERY_SYNC , &mddev->recovery) && + (j > mddev->recovery_cp)) + mddev->recovery_cp = j;set_bit (MD_CHANGE_CLEAN , &mddev->flags);sysfs_notify (&mddev->kobj,NULL ,"sync_completed" ); }
Applied, thanks.
NeilBrown