Browse Source

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>
马建朋 14 years ago
parent
commit
9864c0053d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      drivers/md/md.c

+ 2 - 0
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;
 	}