diff options
| -rw-r--r-- | drivers/md/md.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index fd55f2a555b1..c4bdf0601757 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
| @@ -4421,34 +4421,6 @@ static int do_md_run(mddev_t * mddev) | |||
| 4421 | 4421 | ||
| 4422 | set_capacity(disk, mddev->array_sectors); | 4422 | set_capacity(disk, mddev->array_sectors); |
| 4423 | 4423 | ||
| 4424 | /* If there is a partially-recovered drive we need to | ||
| 4425 | * start recovery here. If we leave it to md_check_recovery, | ||
| 4426 | * it will remove the drives and not do the right thing | ||
| 4427 | */ | ||
| 4428 | if (mddev->degraded && !mddev->sync_thread) { | ||
| 4429 | int spares = 0; | ||
| 4430 | list_for_each_entry(rdev, &mddev->disks, same_set) | ||
| 4431 | if (rdev->raid_disk >= 0 && | ||
| 4432 | !test_bit(In_sync, &rdev->flags) && | ||
| 4433 | !test_bit(Faulty, &rdev->flags)) | ||
| 4434 | /* complete an interrupted recovery */ | ||
| 4435 | spares++; | ||
| 4436 | if (spares && mddev->pers->sync_request) { | ||
| 4437 | mddev->recovery = 0; | ||
| 4438 | set_bit(MD_RECOVERY_RUNNING, &mddev->recovery); | ||
| 4439 | set_bit(MD_RECOVERY_RECOVER, &mddev->recovery); | ||
| 4440 | mddev->sync_thread = md_register_thread(md_do_sync, | ||
| 4441 | mddev, | ||
| 4442 | "resync"); | ||
| 4443 | if (!mddev->sync_thread) { | ||
| 4444 | printk(KERN_ERR "%s: could not start resync" | ||
| 4445 | " thread...\n", | ||
| 4446 | mdname(mddev)); | ||
| 4447 | /* leave the spares where they are, it shouldn't hurt */ | ||
| 4448 | mddev->recovery = 0; | ||
| 4449 | } | ||
| 4450 | } | ||
| 4451 | } | ||
| 4452 | md_wakeup_thread(mddev->thread); | 4424 | md_wakeup_thread(mddev->thread); |
| 4453 | md_wakeup_thread(mddev->sync_thread); /* possibly kick off a reshape */ | 4425 | md_wakeup_thread(mddev->sync_thread); /* possibly kick off a reshape */ |
| 4454 | 4426 | ||
