diff options
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 9f76e0cd7805..fb50e5642c63 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -3095,7 +3095,6 @@ static int do_md_run(mddev_t * mddev) | |||
3095 | } | 3095 | } |
3096 | 3096 | ||
3097 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); | 3097 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); |
3098 | md_wakeup_thread(mddev->thread); | ||
3099 | 3098 | ||
3100 | if (mddev->sb_dirty) | 3099 | if (mddev->sb_dirty) |
3101 | md_update_sb(mddev); | 3100 | md_update_sb(mddev); |
@@ -3116,7 +3115,7 @@ static int do_md_run(mddev_t * mddev) | |||
3116 | * start recovery here. If we leave it to md_check_recovery, | 3115 | * start recovery here. If we leave it to md_check_recovery, |
3117 | * it will remove the drives and not do the right thing | 3116 | * it will remove the drives and not do the right thing |
3118 | */ | 3117 | */ |
3119 | if (mddev->degraded) { | 3118 | if (mddev->degraded && !mddev->sync_thread) { |
3120 | struct list_head *rtmp; | 3119 | struct list_head *rtmp; |
3121 | int spares = 0; | 3120 | int spares = 0; |
3122 | ITERATE_RDEV(mddev,rdev,rtmp) | 3121 | ITERATE_RDEV(mddev,rdev,rtmp) |
@@ -3137,10 +3136,11 @@ static int do_md_run(mddev_t * mddev) | |||
3137 | mdname(mddev)); | 3136 | mdname(mddev)); |
3138 | /* leave the spares where they are, it shouldn't hurt */ | 3137 | /* leave the spares where they are, it shouldn't hurt */ |
3139 | mddev->recovery = 0; | 3138 | mddev->recovery = 0; |
3140 | } else | 3139 | } |
3141 | md_wakeup_thread(mddev->sync_thread); | ||
3142 | } | 3140 | } |
3143 | } | 3141 | } |
3142 | md_wakeup_thread(mddev->thread); | ||
3143 | md_wakeup_thread(mddev->sync_thread); /* possibly kick off a reshape */ | ||
3144 | 3144 | ||
3145 | mddev->changed = 1; | 3145 | mddev->changed = 1; |
3146 | md_new_event(mddev); | 3146 | md_new_event(mddev); |