Re: waiting 10s before mounting root filesystem?

From: Jesper Juhl (juhl-lkml_at_dif.dk)
Date: 12/31/04

  • Next message: Srinivas G.: "kernel panic: Attempted to kill init!"
    Date:	Fri, 31 Dec 2004 05:41:33 +0100 (CET)
    To: William Park <opengeometry@yahoo.ca>
    
    

    On Thu, 30 Dec 2004, William Park wrote:

    > On Fri, Dec 31, 2004 at 02:45:53AM +0100, Jesper Juhl wrote:
    > > William Park wrote:
    > > > On Thu, Dec 30, 2004 at 01:25:32PM -0200, Marcelo Tosatti wrote:
    > > > > On Tue, Dec 28, 2004 at 07:59:22PM -0500, William Park wrote:
    > > > > > On Mon, Dec 27, 2004 at 10:23:34PM +0100, Andreas Unterkircher wrote:
    > > > > > > [1] http://www.xenotime.net/linux/usb/usbboot-2422.patch
    > ...
    > > > http://linux.bkbits.net:8080/linux-2.4/patch@1.1527.1.20?nav=index.html|ChangeSet@-3w|cset@1.1527.1.20
    > > >
    > > > Hi Marcelo,
    > > >
    > > > 1. Actually, my patch above loops every 5s to reduce screen clutter,
    > > > whereas the original 2.4 patch (cited by Andreas Unterkircher) loops
    > > > every 1s. Both loops forever.
    > > >
    > > > But, if a limit of 10 tries is what you want, then here is a patch
    > > > for 2.6.10:
    > >
    > > I agree with you that reducing screen clutter is a good thing. How
    > > about something like this that waits for 10+ seconds so even slow
    > > devices have a chance to get up but also does some primitive
    > > ratelimiting on the messages by only printing one every 3 seconds (but
    > > still attempting to mount every 1 sec) ?
    >
    > Hi Jesper,
    >
    > I prefer countdown with short message. The 2.4 messages are too long.
    > Incorporating your use of ssleep() and printk() loglevel, here is
    > the latest iteration:
    >
    > --- ./init/do_mounts.c--orig 2004-12-27 17:36:35.000000000 -0500
    > +++ ./init/do_mounts.c 2004-12-30 22:43:57.000000000 -0500
    > @@ -6,6 +6,7 @@
    > #include <linux/suspend.h>
    > #include <linux/root_dev.h>
    > #include <linux/security.h>
    > +#include <linux/delay.h>
    >
    > #include <linux/nfs_fs.h>
    > #include <linux/nfs_fs_sb.h>
    > @@ -278,6 +279,7 @@
    > char *fs_names = __getname();
    > char *p;
    > char b[BDEVNAME_SIZE];
    > + int tryagain = 20;
    >
    Ok, I'm nitpicking here, but why int and not short? are we likely to ever
    want to wait for more than 2 minutes? and if we want to wait ~3min, then
    unsigned short should do just fine (and unsigned would even be logical
    since negative retry value doesn't make any sense)....

    > + if (--tryagain) {

    I think if (tryagain--) makes more sense. You set tryagain to 20 thereby
    implying that we will be doing 20 retries, but with --tryagain we will
    only be doing 19 retries, not 20 - with tryagain-- we will be doing the
    nr. of retries that we initially initialize 'tryagain' to.

    other than that (and it /is/ nitpicking) the patch looks good to me.

    -- 
    Jesper Juhl
    -
    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/
    

  • Next message: Srinivas G.: "kernel panic: Attempted to kill init!"

    Relevant Pages

    • Re: ide retry behavior
      ... the kernel retries up to 8 times to read the same ... Under error free ... Thanks to your hint, I've found the offending piece in ide-disk.c/900: ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: 2.6.10: e100 network broken after swsusp/resume
      ... > but the dhclient it runs just tries and retries to get an ip without ... > i've tried reloading e100, mii, and even af_packet, but only a reboot ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Driver retries disk errors.
      ... > doing 8 retries. ... Most disk we see retry themselves for about a ... As I said media players need a way to turn it to no retry ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Driver retries disk errors.
      ... > IDE code still retries a bad block 8 times? ... > practise" if there is a filesystem requesting the block. ... which should cause the disk to do its own disk block ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)