diff options
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/md.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 25b893ec562e..8cfadc5bd2ba 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -6138,7 +6138,8 @@ void md_check_recovery(mddev_t *mddev) | |||
6138 | /* resync has finished, collect result */ | 6138 | /* resync has finished, collect result */ |
6139 | md_unregister_thread(mddev->sync_thread); | 6139 | md_unregister_thread(mddev->sync_thread); |
6140 | mddev->sync_thread = NULL; | 6140 | mddev->sync_thread = NULL; |
6141 | if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { | 6141 | if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery) && |
6142 | !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) { | ||
6142 | /* success...*/ | 6143 | /* success...*/ |
6143 | /* activate any spares */ | 6144 | /* activate any spares */ |
6144 | if (mddev->pers->spare_active(mddev)) | 6145 | if (mddev->pers->spare_active(mddev)) |
@@ -6190,6 +6191,7 @@ void md_check_recovery(mddev_t *mddev) | |||
6190 | } else if ((spares = remove_and_add_spares(mddev))) { | 6191 | } else if ((spares = remove_and_add_spares(mddev))) { |
6191 | clear_bit(MD_RECOVERY_SYNC, &mddev->recovery); | 6192 | clear_bit(MD_RECOVERY_SYNC, &mddev->recovery); |
6192 | clear_bit(MD_RECOVERY_CHECK, &mddev->recovery); | 6193 | clear_bit(MD_RECOVERY_CHECK, &mddev->recovery); |
6194 | clear_bit(MD_RECOVERY_REQUESTED, &mddev->recovery); | ||
6193 | set_bit(MD_RECOVERY_RECOVER, &mddev->recovery); | 6195 | set_bit(MD_RECOVERY_RECOVER, &mddev->recovery); |
6194 | } else if (mddev->recovery_cp < MaxSector) { | 6196 | } else if (mddev->recovery_cp < MaxSector) { |
6195 | set_bit(MD_RECOVERY_SYNC, &mddev->recovery); | 6197 | set_bit(MD_RECOVERY_SYNC, &mddev->recovery); |