diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/md.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 9b82377a833b..3b25b72ef0b6 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -6405,6 +6405,12 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode, | |||
6405 | /* need to ensure md_delayed_delete() has completed */ | 6405 | /* need to ensure md_delayed_delete() has completed */ |
6406 | flush_workqueue(md_misc_wq); | 6406 | flush_workqueue(md_misc_wq); |
6407 | 6407 | ||
6408 | if (cmd == HOT_REMOVE_DISK) | ||
6409 | /* need to ensure recovery thread has run */ | ||
6410 | wait_event_interruptible_timeout(mddev->sb_wait, | ||
6411 | !test_bit(MD_RECOVERY_NEEDED, | ||
6412 | &mddev->flags), | ||
6413 | msecs_to_jiffies(5000)); | ||
6408 | err = mddev_lock(mddev); | 6414 | err = mddev_lock(mddev); |
6409 | if (err) { | 6415 | if (err) { |
6410 | printk(KERN_INFO | 6416 | printk(KERN_INFO |
@@ -7892,6 +7898,8 @@ void md_check_recovery(struct mddev *mddev) | |||
7892 | md_new_event(mddev); | 7898 | md_new_event(mddev); |
7893 | } | 7899 | } |
7894 | unlock: | 7900 | unlock: |
7901 | wake_up(&mddev->sb_wait); | ||
7902 | |||
7895 | if (!mddev->sync_thread) { | 7903 | if (!mddev->sync_thread) { |
7896 | clear_bit(MD_RECOVERY_RUNNING, &mddev->recovery); | 7904 | clear_bit(MD_RECOVERY_RUNNING, &mddev->recovery); |
7897 | if (test_and_clear_bit(MD_RECOVERY_RECOVER, | 7905 | if (test_and_clear_bit(MD_RECOVERY_RECOVER, |