Commit 8ba4caf1ee1585f018d32ab924244c9589bc9f37

Authored by Paul Gortmaker
Committed by Linus Torvalds
1 parent 37504a3be9

Revert "init: make rootdelay=N consistent with rootwait behaviour"

This reverts commit 4dfe694f616e00e6fd83e5bbcd7a3c4d7113493d.

In that, we did:

  Here we move the rootdelay code to be right beside the rootwait code, so
  that their behaviour is consistent.

...which is fine, but in hindsight, perhaps moving the rootwait to be
beside the rootdelay would have been better.  We also indicated:

  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.

But Pavel reported an instance where an ARM target with root on MMC
was failing to mount root, and Russell diagnosed it to the fact that
the call to set ROOT_DEV within the saved_root_name[0] processing
block mentioned above was no longer being delayed.

Rather than moving both wait clauses to the original position of
rootdelay and risking unearthing other possible corner case breakage
at this point in time, we simply revert now and we can revisit
trying the alternate/earlier location in another development cycle.

Cc: Pavel Machek <pavel@denx.de>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 6 additions and 6 deletions Side-by-side Diff

... ... @@ -539,6 +539,12 @@
539 539 {
540 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 +
542 548 /*
543 549 * wait for the known devices to complete their probing
544 550 *
... ... @@ -564,12 +570,6 @@
564 570  
565 571 if (initrd_load())
566 572 goto out;
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 573  
574 574 /* wait for any asynchronous scanning to complete */
575 575 if ((ROOT_DEV == 0) && root_wait) {