aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid10.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r--drivers/md/raid10.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 253322ae9195..f23d52c5df94 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -1883,11 +1883,11 @@ static int run(mddev_t *mddev)
1883 int nc, fc; 1883 int nc, fc;
1884 sector_t stride, size; 1884 sector_t stride, size;
1885 1885
1886 if (mddev->level != 10) { 1886 if (mddev->chunk_size == 0) {
1887 printk(KERN_ERR "raid10: %s: raid level not set correctly... (%d)\n", 1887 printk(KERN_ERR "md/raid10: non-zero chunk size required.\n");
1888 mdname(mddev), mddev->level); 1888 return -EINVAL;
1889 goto out;
1890 } 1889 }
1890
1891 nc = mddev->layout & 255; 1891 nc = mddev->layout & 255;
1892 fc = (mddev->layout >> 8) & 255; 1892 fc = (mddev->layout >> 8) & 255;
1893 if ((nc*fc) <2 || (nc*fc) > mddev->raid_disks || 1893 if ((nc*fc) <2 || (nc*fc) > mddev->raid_disks ||
@@ -2072,9 +2072,10 @@ static void raid10_quiesce(mddev_t *mddev, int state)
2072 } 2072 }
2073} 2073}
2074 2074
2075static mdk_personality_t raid10_personality = 2075static struct mdk_personality raid10_personality =
2076{ 2076{
2077 .name = "raid10", 2077 .name = "raid10",
2078 .level = 10,
2078 .owner = THIS_MODULE, 2079 .owner = THIS_MODULE,
2079 .make_request = make_request, 2080 .make_request = make_request,
2080 .run = run, 2081 .run = run,
@@ -2090,15 +2091,16 @@ static mdk_personality_t raid10_personality =
2090 2091
2091static int __init raid_init(void) 2092static int __init raid_init(void)
2092{ 2093{
2093 return register_md_personality(RAID10, &raid10_personality); 2094 return register_md_personality(&raid10_personality);
2094} 2095}
2095 2096
2096static void raid_exit(void) 2097static void raid_exit(void)
2097{ 2098{
2098 unregister_md_personality(RAID10); 2099 unregister_md_personality(&raid10_personality);
2099} 2100}
2100 2101
2101module_init(raid_init); 2102module_init(raid_init);
2102module_exit(raid_exit); 2103module_exit(raid_exit);
2103MODULE_LICENSE("GPL"); 2104MODULE_LICENSE("GPL");
2104MODULE_ALIAS("md-personality-9"); /* RAID10 */ 2105MODULE_ALIAS("md-personality-9"); /* RAID10 */
2106MODULE_ALIAS("md-level-10");