aboutsummaryrefslogtreecommitdiffstats
path: root/init/do_mounts.c
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2014-08-08 17:19:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 18:57:18 -0400
commit4dfe694f616e00e6fd83e5bbcd7a3c4d7113493d (patch)
tree88cfc07a6e22fc75ba7260e83c0bd485353bc3c4 /init/do_mounts.c
parent6f4535ed7d626c3760243b9c5223baaa358a5fdd (diff)
init: make rootdelay=N consistent with rootwait behaviour
Currently rootdelay=N and rootwait behave differently (aside from the obvious unbounded wait duration) because they are at different places in the init sequence. The difference manifests itself for md devices because the call to md_run_setup() lives between rootdelay and rootwait, so if you try to use rootdelay=20 to try and allow a slow RAID0 array to assemble, you get this: [ 4.526011] sd 6:0:0:0: [sdc] Attached SCSI removable disk [ 22.972079] md: Waiting for all devices to be available before autodetect i.e. you've achieved nothing other than delaying the probing 20s, when what you wanted was a 20s delay _after_ the probing for md devices was initiated. Here we move the rootdelay code to be right beside the rootwait code, so that their behaviour is consistent. It should be noted that in doing so, the actions based on the saved_root_name[0] and initrd_load() were previously put on hold by rootdelay=N and now currently will not be delayed. However, I think consistent behaviour is more important than matching historical behaviour of delaying the above two operations. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init/do_mounts.c')
-rw-r--r--init/do_mounts.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 82f22885c87e..b6237c31b0e2 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -539,12 +539,6 @@ void __init prepare_namespace(void)
539{ 539{
540 int is_floppy; 540 int is_floppy;
541 541
542 if (root_delay) {
543 printk(KERN_INFO "Waiting %d sec before mounting root device...\n",
544 root_delay);
545 ssleep(root_delay);
546 }
547
548 /* 542 /*
549 * wait for the known devices to complete their probing 543 * wait for the known devices to complete their probing
550 * 544 *
@@ -571,6 +565,12 @@ void __init prepare_namespace(void)
571 if (initrd_load()) 565 if (initrd_load())
572 goto out; 566 goto out;
573 567
568 if (root_delay) {
569 pr_info("Waiting %d sec before mounting root device...\n",
570 root_delay);
571 ssleep(root_delay);
572 }
573
574 /* wait for any asynchronous scanning to complete */ 574 /* wait for any asynchronous scanning to complete */
575 if ((ROOT_DEV == 0) && root_wait) { 575 if ((ROOT_DEV == 0) && root_wait) {
576 printk(KERN_INFO "Waiting for root device %s...\n", 576 printk(KERN_INFO "Waiting for root device %s...\n",