lkml.org 
[lkml]   [2002]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: patch to have root fs on USB device (please CC)
Hi,

On Sun, 2 Jun 2002, Paul Stoeber wrote:
> --- init/do_mounts.c.orig Sat May 25 18:11:45 2002
> +++ init/do_mounts.c Sat May 25 18:15:22 2002
> @@ -311,9 +311,13 @@
> }
> static void __init mount_block_root(char *name, int flags)
> {
> - char *fs_names = __getname();
> + char *fs_names;
> char *p;
>
> + set_current_state(TASK_UNINTERRUPTIBLE);
> + schedule_timeout(10*HZ);
> +
> + fs_names = __getname();
> get_fs_names(fs_names);
> retry:
> for (p = fs_names; *p; p += strlen(p)+1) {

I think we shouldn't bind it on time but rather on whether the device is
available. Maybe check that instead of schedule_timeout(10*HZ)?

BTW, we stay in TASK_UNINTERRUPTIBLE here!

+ int i;
+
+ if (!(flags & SOMETHING_SAYING_WE_SHALL_NOT_INTERRUPT)) {
+ while (!path_lookup(name, LOOKUP_FOLLOW, &dummy)) {
+ i++;
+ printk(KERN_NOTICE "Root FS not yet available!\n");
+ if (i > 10)
+ break;
+
+ schedule_timeout(HZ/2);
+ }
+ }

or whatever.

Regards,
Thunder
--
ship is leaving right on time | Thunder from the hill at ngforever
empty harbour, wave goodbye |
evacuation of the isle | free inhabitant not directly
caveman's paintings drowning | belonging anywhere


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.034 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site