By default md_do_sync() will perform recovery if no other actions are
specified. However, action_show() relies on MD_RECOVERY_RECOVER to be
set otherwise it returns 'idle'. So, add a missing set
MD_RECOVERY_RECOVER when starting recovery.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
if (spares && mddev->pers->sync_request) {
mddev->recovery = 0;
set_bit(MD_RECOVERY_RUNNING, &mddev->recovery);
+ set_bit(MD_RECOVERY_RECOVER, &mddev->recovery);
mddev->sync_thread = md_register_thread(md_do_sync,
mddev,
"resync");