diff options
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 8fda38d23e38..2382cfc9bb3f 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -7381,8 +7381,10 @@ void md_do_sync(struct md_thread *thread) | |||
7381 | /* just incase thread restarts... */ | 7381 | /* just incase thread restarts... */ |
7382 | if (test_bit(MD_RECOVERY_DONE, &mddev->recovery)) | 7382 | if (test_bit(MD_RECOVERY_DONE, &mddev->recovery)) |
7383 | return; | 7383 | return; |
7384 | if (mddev->ro) /* never try to sync a read-only array */ | 7384 | if (mddev->ro) {/* never try to sync a read-only array */ |
7385 | set_bit(MD_RECOVERY_INTR, &mddev->recovery); | ||
7385 | return; | 7386 | return; |
7387 | } | ||
7386 | 7388 | ||
7387 | if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { | 7389 | if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { |
7388 | if (test_bit(MD_RECOVERY_CHECK, &mddev->recovery)) { | 7390 | if (test_bit(MD_RECOVERY_CHECK, &mddev->recovery)) { |
@@ -7824,6 +7826,7 @@ void md_check_recovery(struct mddev *mddev) | |||
7824 | /* There is no thread, but we need to call | 7826 | /* There is no thread, but we need to call |
7825 | * ->spare_active and clear saved_raid_disk | 7827 | * ->spare_active and clear saved_raid_disk |
7826 | */ | 7828 | */ |
7829 | set_bit(MD_RECOVERY_INTR, &mddev->recovery); | ||
7827 | md_reap_sync_thread(mddev); | 7830 | md_reap_sync_thread(mddev); |
7828 | clear_bit(MD_RECOVERY_NEEDED, &mddev->recovery); | 7831 | clear_bit(MD_RECOVERY_NEEDED, &mddev->recovery); |
7829 | goto unlock; | 7832 | goto unlock; |
@@ -8516,7 +8519,8 @@ static int md_notify_reboot(struct notifier_block *this, | |||
8516 | if (mddev_trylock(mddev)) { | 8519 | if (mddev_trylock(mddev)) { |
8517 | if (mddev->pers) | 8520 | if (mddev->pers) |
8518 | __md_stop_writes(mddev); | 8521 | __md_stop_writes(mddev); |
8519 | mddev->safemode = 2; | 8522 | if (mddev->persistent) |
8523 | mddev->safemode = 2; | ||
8520 | mddev_unlock(mddev); | 8524 | mddev_unlock(mddev); |
8521 | } | 8525 | } |
8522 | need_delay = 1; | 8526 | need_delay = 1; |