
From: NeilBrown <neilb@cse.unsw.edu.au>

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>
---

 drivers/md/md.c |    2 ++
 1 files changed, 2 insertions(+)

diff -puN drivers/md/md.c~md-make-sure-recovery-happens-when-add_new_disk-is-used-for-hot_add drivers/md/md.c
--- 25/drivers/md/md.c~md-make-sure-recovery-happens-when-add_new_disk-is-used-for-hot_add	2005-05-13 22:44:56.000000000 -0700
+++ 25-akpm/drivers/md/md.c	2005-05-13 22:44:56.000000000 -0700
@@ -2083,6 +2083,8 @@ static int add_new_disk(mddev_t * mddev,
 		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;
_
