*/
-static int analyze_sbs(mddev_t * mddev)
+static void analyze_sbs(mddev_t * mddev)
{
int i;
struct list_head *tmp;
" -- starting background reconstruction\n",
mdname(mddev));
- return 0;
}
int mdp_major = 0;
struct gendisk *disk;
char b[BDEVNAME_SIZE];
- if (list_empty(&mddev->disks)) {
- MD_BUG();
+ if (list_empty(&mddev->disks))
+ /* cannot run an array with no devices.. */
return -EINVAL;
- }
if (mddev->pers)
return -EBUSY;
/*
* Analyze all RAID superblock(s)
*/
- if (!mddev->raid_disks && analyze_sbs(mddev)) {
- MD_BUG();
- return -EINVAL;
- }
+ if (!mddev->raid_disks)
+ analyze_sbs(mddev);
chunk_size = mddev->chunk_size;
pnum = level_to_pers(mddev->level);
* chunk-size has to be a power of 2 and multiples of PAGE_SIZE
*/
if ( (1 << ffz(~chunk_size)) != chunk_size) {
- MD_BUG();
+ printk(KERN_ERR "chunk_size of %d not valid\n", chunk_size);
return -EINVAL;
}
if (chunk_size < PAGE_SIZE) {
}
}
- if (pnum >= MAX_PERSONALITY) {
- MD_BUG();
- return -EINVAL;
- }
-
#ifdef CONFIG_KMOD
if (!pers[pnum])
{
struct list_head *tmp;
int err;
- if (list_empty(&mddev->disks)) {
- MD_BUG();
+ if (list_empty(&mddev->disks))
return;
- }
printk(KERN_INFO "md: running: ");
spin_lock(&pers_lock);
if (pers[pnum]) {
spin_unlock(&pers_lock);
- MD_BUG();
return -EBUSY;
}
int unregister_md_personality(int pnum)
{
- if (pnum >= MAX_PERSONALITY) {
- MD_BUG();
+ if (pnum >= MAX_PERSONALITY)
return -EINVAL;
- }
printk(KERN_INFO "md: %s personality unregistered\n", pers[pnum]->name);
spin_lock(&pers_lock);