Commit c361777f authored by NeilBrown's avatar NeilBrown Committed by Linus Torvalds

[PATCH] md: make sure recovery happens when add_new_disk is used for 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: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6ea9c07c
...@@ -2083,6 +2083,8 @@ static int add_new_disk(mddev_t * mddev, mdu_disk_info_t *info) ...@@ -2083,6 +2083,8 @@ static int add_new_disk(mddev_t * mddev, mdu_disk_info_t *info)
err = bind_rdev_to_array(rdev, mddev); err = bind_rdev_to_array(rdev, mddev);
if (err) if (err)
export_rdev(rdev); export_rdev(rdev);
set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
if (mddev->thread) if (mddev->thread)
md_wakeup_thread(mddev->thread); md_wakeup_thread(mddev->thread);
return err; return err;
......
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