Commit a2d79c32 authored by Dan Williams's avatar Dan Williams Committed by NeilBrown

md: make recovery started by do_md_run() visible via sync_action

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: default avatarDan Williams <dan.j.williams@intel.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent 0f9552b5
...@@ -4436,6 +4436,7 @@ static int do_md_run(mddev_t * mddev) ...@@ -4436,6 +4436,7 @@ static int do_md_run(mddev_t * mddev)
if (spares && mddev->pers->sync_request) { if (spares && mddev->pers->sync_request) {
mddev->recovery = 0; mddev->recovery = 0;
set_bit(MD_RECOVERY_RUNNING, &mddev->recovery); set_bit(MD_RECOVERY_RUNNING, &mddev->recovery);
set_bit(MD_RECOVERY_RECOVER, &mddev->recovery);
mddev->sync_thread = md_register_thread(md_do_sync, mddev->sync_thread = md_register_thread(md_do_sync,
mddev, mddev,
"resync"); "resync");
......
Markdown is supported
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