]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid5: Fix a bug about judging if the operation is syncing or replacing
authormajianpeng <majianpeng@gmail.com>
Sun, 1 Apr 2012 15:16:59 +0000 (01:16 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 3 Apr 2012 05:37:38 +0000 (15:37 +1000)
commit6d4c59c2fab23b6108cef08b4ba37d088a1963ef
tree521616d7bd6ff7eb38217bed1b81c5960fa2023d
parentc4b0b7f79f785745d346833d96b13918e67a7281
md/raid5: Fix a bug about judging if the operation is syncing or replacing

When create a raid5 using assume-clean and echo check or repair to
sync_action.Then component disks did not operated IO but the raid
check/resync faster than normal.
Because the judgement in function analyse_stripe():
if (do_recovery ||
    sh->sector >= conf->mddev->recovery_cp)
s->syncing = 1;
else
s->replacing = 1;
When check or repair,the recovery_cp == MaxSectore,so syncing equal zero
not one.

This bug was introduced by commit dda422291052
    md/raid5:  detect and handle replacements during recovery.
so this patch is suitable for 3.3-stable.

Cc: stable@vger.kernel.org
Signed-off-by: majianpeng <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid5.c