Skip to content

Commit

Permalink
md: make recovery started by do_md_run() visible via sync_action
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Williams authored and NeilBrown committed Dec 30, 2009
1 parent 0f9552b commit a2d79c3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -4436,6 +4436,7 @@ static int do_md_run(mddev_t * mddev)
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");
Expand Down

0 comments on commit a2d79c3

Please sign in to comment.