Skip to content
Commit ed209584 authored by NeilBrown's avatar NeilBrown
Browse files

md: don't call ->add_disk unless there is good reason.

Commit 7bfec5f3



   md/raid5: If there is a spare and a want_replacement device, start replacement.

cause md_check_recovery to call ->add_disk much more often.
Instead of only when the array is degraded, it is now called whenever
md_check_recovery finds anything useful to do, which includes
updating the metadata for clean<->dirty transition.
This causes unnecessary work, and causes info messages from ->add_disk
to be reported much too often.

So refine md_check_recovery to only do any actual recovery checking
(including ->add_disk) if MD_RECOVERY_NEEDED is set.

This fix is suitable for 3.3.y:

Cc: stable@vger.kernel.org
Reported-by: default avatarJan Ceuleers <jan.ceuleers@computer.org>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent a9ad8526
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment