md: add takeover support for raid4 -> raid5 conversion.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2009-03-31 14:57:09 +11:00
parent b354603527
commit e9d4758f6e

View File

@ -4967,6 +4967,11 @@ static void *raid5_takeover(mddev_t *mddev)
if (mddev->level == 1)
return raid5_takeover_raid1(mddev);
if (mddev->level == 4) {
mddev->new_layout = ALGORITHM_PARITY_N;
mddev->new_level = 5;
return setup_conf(mddev);
}
return ERR_PTR(-EINVAL);
}