aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid0.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r--drivers/md/raid0.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index b4eaa67fabde..7fb69e29391b 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -275,7 +275,11 @@ static int raid0_run (mddev_t *mddev)
275 mdk_rdev_t *rdev; 275 mdk_rdev_t *rdev;
276 struct list_head *tmp; 276 struct list_head *tmp;
277 277
278 printk("%s: setting max_sectors to %d, segment boundary to %d\n", 278 if (mddev->chunk_size == 0) {
279 printk(KERN_ERR "md/raid0: non-zero chunk size required.\n");
280 return -EINVAL;
281 }
282 printk(KERN_INFO "%s: setting max_sectors to %d, segment boundary to %d\n",
279 mdname(mddev), 283 mdname(mddev),
280 mddev->chunk_size >> 9, 284 mddev->chunk_size >> 9,
281 (mddev->chunk_size>>1)-1); 285 (mddev->chunk_size>>1)-1);
@@ -507,9 +511,10 @@ static void raid0_status (struct seq_file *seq, mddev_t *mddev)
507 return; 511 return;
508} 512}
509 513
510static mdk_personality_t raid0_personality= 514static struct mdk_personality raid0_personality=
511{ 515{
512 .name = "raid0", 516 .name = "raid0",
517 .level = 0,
513 .owner = THIS_MODULE, 518 .owner = THIS_MODULE,
514 .make_request = raid0_make_request, 519 .make_request = raid0_make_request,
515 .run = raid0_run, 520 .run = raid0_run,
@@ -519,15 +524,16 @@ static mdk_personality_t raid0_personality=
519 524
520static int __init raid0_init (void) 525static int __init raid0_init (void)
521{ 526{
522 return register_md_personality (RAID0, &raid0_personality); 527 return register_md_personality (&raid0_personality);
523} 528}
524 529
525static void raid0_exit (void) 530static void raid0_exit (void)
526{ 531{
527 unregister_md_personality (RAID0); 532 unregister_md_personality (&raid0_personality);
528} 533}
529 534
530module_init(raid0_init); 535module_init(raid0_init);
531module_exit(raid0_exit); 536module_exit(raid0_exit);
532MODULE_LICENSE("GPL"); 537MODULE_LICENSE("GPL");
533MODULE_ALIAS("md-personality-2"); /* RAID0 */ 538MODULE_ALIAS("md-personality-2"); /* RAID0 */
539MODULE_ALIAS("md-level-0");