/[linux-patches]/genpatches-2.6/historical/2.6.10/2305_rootdelay-boot-param.patch
Gentoo

Contents of /genpatches-2.6/historical/2.6.10/2305_rootdelay-boot-param.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (hide annotations) (download) (as text)
Sat Jun 11 23:16:54 2005 UTC (15 years, 2 months ago) by dsd
File MIME type: text/x-diff
File size: 1794 byte(s)
Import historical releases
1 dsd 2 Adds a boot parameter which can be used to specify a delay (in seconds) before
2     the root device is decoded/discovered/mounted.
3    
4     Example usage for 10 second delay:
5    
6     rootdelay=10
7    
8     Useful for usb-storage devices which no longer make their partitions
9     immediately available, and for other storage devices which require some
10     "spin-up" time.
11    
12     Signed-off-by: Daniel Drake <dsd@gentoo.org>
13    
14     --- linux-2.6.10/init/do_mounts.c.orig 2005-01-20 20:37:01.000000000 +0000
15     +++ linux-2.6.10/init/do_mounts.c 2005-01-20 20:44:47.190899080 +0000
16     @@ -6,6 +6,7 @@
17     #include <linux/suspend.h>
18     #include <linux/root_dev.h>
19     #include <linux/security.h>
20     +#include <linux/delay.h>
21    
22     #include <linux/nfs_fs.h>
23     #include <linux/nfs_fs_sb.h>
24     @@ -228,8 +229,16 @@
25     return 1;
26     }
27    
28     +static unsigned int __initdata root_delay;
29     +static int __init root_delay_setup(char *str)
30     +{
31     + root_delay = simple_strtoul(str, NULL, 0);
32     + return 1;
33     +}
34     +
35     __setup("rootflags=", root_data_setup);
36     __setup("rootfstype=", fs_names_setup);
37     +__setup("rootdelay=", root_delay_setup);
38    
39     static void __init get_fs_names(char *page)
40     {
41     @@ -387,6 +396,12 @@
42    
43     mount_devfs();
44    
45     + if (root_delay) {
46     + printk(KERN_INFO "Waiting %dsec before mounting root device...\n",
47     + root_delay);
48     + ssleep(root_delay);
49     + }
50     +
51     md_run_setup();
52    
53     if (saved_root_name[0]) {
54     --- linux-2.6.10/Documentation/kernel-parameters.txt.orig 2005-01-21 17:18:20.000000000 +0000
55     +++ linux-2.6.10/Documentation/kernel-parameters.txt 2005-01-21 17:22:29.000000000 +0000
56     @@ -1072,6 +1072,9 @@ running once the system is up.
57    
58     root= [KNL] Root filesystem
59    
60     + rootdelay= [KNL] Delay (in seconds) to pause before attempting to
61     + mount the root filesystem
62     +
63     rootflags= [KNL] Set root filesystem mount option string
64    
65     rootfstype= [KNL] Set root filesystem type

  ViewVC Help
Powered by ViewVC 1.1.20