From a364092a412975e506415f77f0628cbdd28c3913 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Sun, 21 Sep 2008 15:44:32 -0700 Subject: raid: make RAID autodetect default a KConfig option RAID autodetect has the side effect of requiring synchronisation of all device drivers, which can make the boot several seconds longer (I've measured 7 on one of my laptops).... even for systems that don't have RAID setup for the root filesystem (the only FS where this matters). This patch makes the default for autodetect a config option; either way the user can always override via the kernel command line. Signed-off-by: Arjan van de Ven Acked-by: NeilBrown --- init/do_mounts_md.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'init') diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c index c0dfd3c1e91..48b3fadd83e 100644 --- a/init/do_mounts_md.c +++ b/init/do_mounts_md.c @@ -12,7 +12,12 @@ * The code for that is here. */ -static int __initdata raid_noautodetect, raid_autopart; +#ifdef CONFIG_MD_AUTODETECT +static int __initdata raid_noautodetect; +#else +static int __initdata raid_noautodetect=1; +#endif +static int __initdata raid_autopart; static struct { int minor; @@ -252,6 +257,8 @@ static int __init raid_setup(char *str) if (!strncmp(str, "noautodetect", wlen)) raid_noautodetect = 1; + if (!strncmp(str, "autodetect", wlen)) + raid_noautodetect = 0; if (strncmp(str, "partitionable", wlen)==0) raid_autopart = 1; if (strncmp(str, "part", wlen)==0) @@ -288,7 +295,7 @@ 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"); + printk(KERN_INFO "md: Skipping autodetection of RAID arrays. (raid=autodetect will force)\n"); else autodetect_raid(); md_setup_drive(); -- cgit v1.2.3-70-g09d2