diff options
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r-- | drivers/md/raid10.c | 16 |
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 | ||
2075 | static mdk_personality_t raid10_personality = | 2075 | static 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 | ||
2091 | static int __init raid_init(void) | 2092 | static 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 | ||
2096 | static void raid_exit(void) | 2097 | static void raid_exit(void) |
2097 | { | 2098 | { |
2098 | unregister_md_personality(RAID10); | 2099 | unregister_md_personality(&raid10_personality); |
2099 | } | 2100 | } |
2100 | 2101 | ||
2101 | module_init(raid_init); | 2102 | module_init(raid_init); |
2102 | module_exit(raid_exit); | 2103 | module_exit(raid_exit); |
2103 | MODULE_LICENSE("GPL"); | 2104 | MODULE_LICENSE("GPL"); |
2104 | MODULE_ALIAS("md-personality-9"); /* RAID10 */ | 2105 | MODULE_ALIAS("md-personality-9"); /* RAID10 */ |
2106 | MODULE_ALIAS("md-level-10"); | ||