Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114268
b: refs/heads/master
c: 82cbc11
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar authored and Arjan van de Ven committed Oct 12, 2008
1 parent 399d852 commit b8db483
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 02c15def8400a974fbce02b4f2d65b38c839e88b
refs/heads/master: 82cbc11a4146d6a8acd81f81f7fe17387668107f
36 changes: 21 additions & 15 deletions trunk/init/do_mounts_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,26 +264,32 @@ static int __init raid_setup(char *str)
__setup("raid=", raid_setup);
__setup("md=", md_setup);

static void autodetect_raid(void)
{
int fd;

/*
* Since we don't want to detect and use half a raid array, we need to
* wait for the known devices to complete their probing
*/
printk(KERN_INFO "md: Waiting for all devices to be available before autodetect\n");
printk(KERN_INFO "md: If you don't use raid, use raid=noautodetect\n");
while (driver_probe_done() < 0)
msleep(100);
fd = sys_open("/dev/md0", 0, 0);
if (fd >= 0) {
sys_ioctl(fd, RAID_AUTORUN, raid_autopart);
sys_close(fd);
}
}

void __init md_run_setup(void)
{
create_dev("/dev/md0", MKDEV(MD_MAJOR, 0));

if (raid_noautodetect)
printk(KERN_INFO "md: Skipping autodetection of RAID arrays. (raid=noautodetect)\n");
else {
/*
* Since we don't want to detect and use half a raid array, we need to
* wait for the known devices to complete their probing
*/
printk(KERN_INFO "md: Waiting for all devices to be available before autodetect\n");
printk(KERN_INFO "md: If you don't use raid, use raid=noautodetect\n");
while (driver_probe_done() < 0)
msleep(100);
int fd = sys_open("/dev/md0", 0, 0);
if (fd >= 0) {
sys_ioctl(fd, RAID_AUTORUN, raid_autopart);
sys_close(fd);
}
}
else
autodetect_raid();
md_setup_drive();
}

0 comments on commit b8db483

Please sign in to comment.