aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/raid0.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index ac09b7d38553..563abed5a2cb 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -569,7 +569,7 @@ static void raid0_status(struct seq_file *seq, mddev_t *mddev)
569 return; 569 return;
570} 570}
571 571
572static void *raid0_takeover_raid5(mddev_t *mddev) 572static void *raid0_takeover_raid45(mddev_t *mddev)
573{ 573{
574 mdk_rdev_t *rdev; 574 mdk_rdev_t *rdev;
575 raid0_conf_t *priv_conf; 575 raid0_conf_t *priv_conf;
@@ -647,12 +647,16 @@ static void *raid0_takeover_raid10(mddev_t *mddev)
647static void *raid0_takeover(mddev_t *mddev) 647static void *raid0_takeover(mddev_t *mddev)
648{ 648{
649 /* raid0 can take over: 649 /* raid0 can take over:
650 * raid4 - if all data disks are active.
650 * raid5 - providing it is Raid4 layout and one disk is faulty 651 * raid5 - providing it is Raid4 layout and one disk is faulty
651 * raid10 - assuming we have all necessary active disks 652 * raid10 - assuming we have all necessary active disks
652 */ 653 */
654 if (mddev->level == 4)
655 return raid0_takeover_raid45(mddev);
656
653 if (mddev->level == 5) { 657 if (mddev->level == 5) {
654 if (mddev->layout == ALGORITHM_PARITY_N) 658 if (mddev->layout == ALGORITHM_PARITY_N)
655 return raid0_takeover_raid5(mddev); 659 return raid0_takeover_raid45(mddev);
656 660
657 printk(KERN_ERR "md/raid0:%s: Raid can only takeover Raid5 with layout: %d\n", 661 printk(KERN_ERR "md/raid0:%s: Raid can only takeover Raid5 with layout: %d\n",
658 mdname(mddev), ALGORITHM_PARITY_N); 662 mdname(mddev), ALGORITHM_PARITY_N);