md: Using poll /proc/mdstat can monitor the events of adding a spare disks

Signed-off-by: majianpeng <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
马建朋 2011-06-09 11:42:48 +10:00 committed by NeilBrown
parent d744540cd3
commit 9864c0053d

View File

@ -5274,6 +5274,8 @@ static int add_new_disk(mddev_t * mddev, mdu_disk_info_t *info)
if (mddev->degraded)
set_bit(MD_RECOVERY_RECOVER, &mddev->recovery);
set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
if (!err)
md_new_event(mddev);
md_wakeup_thread(mddev->thread);
return err;
}