From: NeilBrown Date: Tue, 31 Mar 2009 03:57:09 +0000 (+1100) Subject: md: add takeover support for raid4 -> raid5 conversion. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e9d4758f6e93488dc719a1445ce54659a570938f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git md: add takeover support for raid4 -> raid5 conversion. Signed-off-by: NeilBrown --- diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 8a5e14e4a851..95953273c4d9 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -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); }