Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

kernelmail and committed by
NeilBrown
35d78c66 c02c0aeb

+3
+3
drivers/md/md.c
··· 7462 7462 wait_event(mddev->recovery_wait, 7463 7463 atomic_read(&mddev->recovery_active) == 0); 7464 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 7468 set_bit(MD_CHANGE_CLEAN, &mddev->flags); 7466 7469 sysfs_notify(&mddev->kobj, NULL, "sync_completed"); 7467 7470 }