提交 c361777f 编写于 作者: N NeilBrown 提交者: 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: NNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册