mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-23 18:07:03 +00:00
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md
Pull MD fixes from Shaohua Li: "Two small fixes for MD: - an error handling fix from me - a recover bug fix for raid10 from BingJing" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: md/raid10: fix that replacement cannot complete recovery after reassemble MD: cleanup resources in failure
This commit is contained in:
commit
d0fbad0aec
@ -5547,7 +5547,8 @@ int md_run(struct mddev *mddev)
|
||||
else
|
||||
pr_warn("md: personality for level %s is not loaded!\n",
|
||||
mddev->clevel);
|
||||
return -EINVAL;
|
||||
err = -EINVAL;
|
||||
goto abort;
|
||||
}
|
||||
spin_unlock(&pers_lock);
|
||||
if (mddev->level != pers->level) {
|
||||
@ -5560,7 +5561,8 @@ int md_run(struct mddev *mddev)
|
||||
pers->start_reshape == NULL) {
|
||||
/* This personality cannot handle reshaping... */
|
||||
module_put(pers->owner);
|
||||
return -EINVAL;
|
||||
err = -EINVAL;
|
||||
goto abort;
|
||||
}
|
||||
|
||||
if (pers->sync_request) {
|
||||
@ -5629,7 +5631,7 @@ int md_run(struct mddev *mddev)
|
||||
mddev->private = NULL;
|
||||
module_put(pers->owner);
|
||||
bitmap_destroy(mddev);
|
||||
return err;
|
||||
goto abort;
|
||||
}
|
||||
if (mddev->queue) {
|
||||
bool nonrot = true;
|
||||
|
@ -3893,6 +3893,13 @@ static int raid10_run(struct mddev *mddev)
|
||||
disk->rdev->saved_raid_disk < 0)
|
||||
conf->fullsync = 1;
|
||||
}
|
||||
|
||||
if (disk->replacement &&
|
||||
!test_bit(In_sync, &disk->replacement->flags) &&
|
||||
disk->replacement->saved_raid_disk < 0) {
|
||||
conf->fullsync = 1;
|
||||
}
|
||||
|
||||
disk->recovery_disabled = mddev->recovery_disabled - 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user