summaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
author马建朋 <majianpeng@gmail.com>2011-06-09 11:42:48 +1000
committerNeilBrown <neilb@suse.de>2011-06-09 11:42:48 +1000
commit9864c0053d3da4c5731ac8a6c4835179310bd40a (patch)
tree4aea4c5a457f9e2c4058abfb2d6b69b843c721c5 /drivers/md/md.c
parentd744540cd39e93976c4c8401e140232444ef3b0b (diff)
downloadlinux-9864c0053d3da4c5731ac8a6c4835179310bd40a.tar.gz
linux-9864c0053d3da4c5731ac8a6c4835179310bd40a.tar.bz2
linux-9864c0053d3da4c5731ac8a6c4835179310bd40a.zip
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>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 9160463b5f68..734bc0996390 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -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;
}