diff options
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 6e4db95cebb1..b0cfd3ca9ca0 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -2187,9 +2187,10 @@ static void raid5_quiesce(mddev_t *mddev, int state) | |||
2187 | } | 2187 | } |
2188 | } | 2188 | } |
2189 | 2189 | ||
2190 | static mdk_personality_t raid5_personality= | 2190 | static struct mdk_personality raid5_personality = |
2191 | { | 2191 | { |
2192 | .name = "raid5", | 2192 | .name = "raid5", |
2193 | .level = 5, | ||
2193 | .owner = THIS_MODULE, | 2194 | .owner = THIS_MODULE, |
2194 | .make_request = make_request, | 2195 | .make_request = make_request, |
2195 | .run = run, | 2196 | .run = run, |
@@ -2204,17 +2205,40 @@ static mdk_personality_t raid5_personality= | |||
2204 | .quiesce = raid5_quiesce, | 2205 | .quiesce = raid5_quiesce, |
2205 | }; | 2206 | }; |
2206 | 2207 | ||
2207 | static int __init raid5_init (void) | 2208 | static struct mdk_personality raid4_personality = |
2208 | { | 2209 | { |
2209 | return register_md_personality (RAID5, &raid5_personality); | 2210 | .name = "raid4", |
2211 | .level = 4, | ||
2212 | .owner = THIS_MODULE, | ||
2213 | .make_request = make_request, | ||
2214 | .run = run, | ||
2215 | .stop = stop, | ||
2216 | .status = status, | ||
2217 | .error_handler = error, | ||
2218 | .hot_add_disk = raid5_add_disk, | ||
2219 | .hot_remove_disk= raid5_remove_disk, | ||
2220 | .spare_active = raid5_spare_active, | ||
2221 | .sync_request = sync_request, | ||
2222 | .resize = raid5_resize, | ||
2223 | .quiesce = raid5_quiesce, | ||
2224 | }; | ||
2225 | |||
2226 | static int __init raid5_init(void) | ||
2227 | { | ||
2228 | register_md_personality(&raid5_personality); | ||
2229 | register_md_personality(&raid4_personality); | ||
2230 | return 0; | ||
2210 | } | 2231 | } |
2211 | 2232 | ||
2212 | static void raid5_exit (void) | 2233 | static void raid5_exit(void) |
2213 | { | 2234 | { |
2214 | unregister_md_personality (RAID5); | 2235 | unregister_md_personality(&raid5_personality); |
2236 | unregister_md_personality(&raid4_personality); | ||
2215 | } | 2237 | } |
2216 | 2238 | ||
2217 | module_init(raid5_init); | 2239 | module_init(raid5_init); |
2218 | module_exit(raid5_exit); | 2240 | module_exit(raid5_exit); |
2219 | MODULE_LICENSE("GPL"); | 2241 | MODULE_LICENSE("GPL"); |
2220 | MODULE_ALIAS("md-personality-4"); /* RAID5 */ | 2242 | MODULE_ALIAS("md-personality-4"); /* RAID5 */ |
2243 | MODULE_ALIAS("md-level-5"); | ||
2244 | MODULE_ALIAS("md-level-4"); | ||