Commit a364092a authored by Arjan van de Ven's avatar Arjan van de Ven

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: default avatarArjan van de Ven <>
Acked-by: default avatarNeilBrown <>
parent 82cbc11a
......@@ -30,6 +30,20 @@ config BLK_DEV_MD
If unsure, say N.
bool "Autodetect RAID arrays during kernel boot"
depends on BLK_DEV_MD
default y
If you say Y here, then the kernel will try to autodetect raid
arrays as part of its boot process.
If you don't use raid and say Y, this autodetection can cause
a several-second delay in the boot time due to various
synchronisation steps that are part of this step.
If unsure, say Y.
config MD_LINEAR
tristate "Linear (append) mode"
depends on BLK_DEV_MD
......@@ -12,7 +12,12 @@
* The code for that is here.
static int __initdata raid_noautodetect, raid_autopart;
static int __initdata raid_noautodetect;
static int __initdata raid_noautodetect=1;
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");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment