diff options
| -rw-r--r-- | drivers/md/Kconfig | 14 | ||||
| -rw-r--r-- | init/do_mounts_md.c | 11 |
2 files changed, 23 insertions, 2 deletions
diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig index 07d92c11b5d..8e72c916535 100644 --- a/drivers/md/Kconfig +++ b/drivers/md/Kconfig | |||
| @@ -30,6 +30,20 @@ config BLK_DEV_MD | |||
| 30 | 30 | ||
| 31 | If unsure, say N. | 31 | If unsure, say N. |
| 32 | 32 | ||
| 33 | config MD_AUTODETECT | ||
| 34 | bool "Autodetect RAID arrays during kernel boot" | ||
| 35 | depends on BLK_DEV_MD | ||
| 36 | default y | ||
| 37 | ---help--- | ||
| 38 | If you say Y here, then the kernel will try to autodetect raid | ||
| 39 | arrays as part of its boot process. | ||
| 40 | |||
| 41 | If you don't use raid and say Y, this autodetection can cause | ||
| 42 | a several-second delay in the boot time due to various | ||
| 43 | synchronisation steps that are part of this step. | ||
| 44 | |||
| 45 | If unsure, say Y. | ||
| 46 | |||
| 33 | config MD_LINEAR | 47 | config MD_LINEAR |
| 34 | tristate "Linear (append) mode" | 48 | tristate "Linear (append) mode" |
| 35 | depends on BLK_DEV_MD | 49 | depends on BLK_DEV_MD |
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 @@ | |||
| 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(); |
