diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2008-09-21 18:44:32 -0400 |
---|---|---|
committer | Arjan van de Ven <arjan@linux.intel.com> | 2008-10-12 11:25:02 -0400 |
commit | a364092a412975e506415f77f0628cbdd28c3913 (patch) | |
tree | 98d7d66e8658c9959b2961f0b40356e981277395 /init | |
parent | 82cbc11a4146d6a8acd81f81f7fe17387668107f (diff) |
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 <arjan@linux.intel.com>
Acked-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'init')
-rw-r--r-- | init/do_mounts_md.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c index c0dfd3c1e91b..48b3fadd83ed 100644 --- a/init/do_mounts_md.c +++ b/init/do_mounts_md.c | |||
@@ -12,7 +12,12 @@ | |||
12 | * The code for that is here. | 12 | * The code for that is here. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | static int __initdata raid_noautodetect, raid_autopart; | 15 | #ifdef CONFIG_MD_AUTODETECT |
16 | static int __initdata raid_noautodetect; | ||
17 | #else | ||
18 | static int __initdata raid_noautodetect=1; | ||
19 | #endif | ||
20 | static int __initdata raid_autopart; | ||
16 | 21 | ||
17 | static struct { | 22 | static struct { |
18 | int minor; | 23 | int minor; |
@@ -252,6 +257,8 @@ static int __init raid_setup(char *str) | |||
252 | 257 | ||
253 | if (!strncmp(str, "noautodetect", wlen)) | 258 | if (!strncmp(str, "noautodetect", wlen)) |
254 | raid_noautodetect = 1; | 259 | raid_noautodetect = 1; |
260 | if (!strncmp(str, "autodetect", wlen)) | ||
261 | raid_noautodetect = 0; | ||
255 | if (strncmp(str, "partitionable", wlen)==0) | 262 | if (strncmp(str, "partitionable", wlen)==0) |
256 | raid_autopart = 1; | 263 | raid_autopart = 1; |
257 | if (strncmp(str, "part", wlen)==0) | 264 | if (strncmp(str, "part", wlen)==0) |
@@ -288,7 +295,7 @@ void __init md_run_setup(void) | |||
288 | create_dev("/dev/md0", MKDEV(MD_MAJOR, 0)); | 295 | create_dev("/dev/md0", MKDEV(MD_MAJOR, 0)); |
289 | 296 | ||
290 | if (raid_noautodetect) | 297 | if (raid_noautodetect) |
291 | printk(KERN_INFO "md: Skipping autodetection of RAID arrays. (raid=noautodetect)\n"); | 298 | printk(KERN_INFO "md: Skipping autodetection of RAID arrays. (raid=autodetect will force)\n"); |
292 | else | 299 | else |
293 | autodetect_raid(); | 300 | autodetect_raid(); |
294 | md_setup_drive(); | 301 | md_setup_drive(); |