]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
md: add takeover support for raid4 -> raid5 conversion.
authorNeilBrown <neilb@suse.de>
Tue, 31 Mar 2009 03:57:09 +0000 (14:57 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 31 Mar 2009 03:57:09 +0000 (14:57 +1100)
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid5.c

index 8a5e14e4a8519e7ab571cfd59a5163dae924bae7..95953273c4d9e0fc8b0e1eebc55f27775f080c31 100644 (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);
 }