Skip to content

Commit

Permalink
[PATCH] md: make sure recovery happens when add_new_disk is used for …
Browse files Browse the repository at this point in the history
…hot_add

Currently if add_new_disk is used to hot-add a drive to a degraded array,
recovery doesn't start ...  because we didn't tell it to.

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Jun 22, 2005
1 parent 6ea9c07 commit c361777
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -2083,6 +2083,8 @@ static int add_new_disk(mddev_t * mddev, mdu_disk_info_t *info)
err = bind_rdev_to_array(rdev, mddev);
if (err)
export_rdev(rdev);

set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
if (mddev->thread)
md_wakeup_thread(mddev->thread);
return err;
Expand Down

0 comments on commit c361777

Please sign in to comment.