Re: ext3: bump mount count on journal replay

From: Pavel Machek (pavel_at_ucw.cz)
Date: 07/14/04

  • Next message: Adrian Bunk: "[patch] 2.6.8-rc1-mm1: 8139too: uninline rtl8139_start_thread"
    Date:	Wed, 14 Jul 2004 22:32:58 +0200
    To: kernel list <linux-kernel@vger.kernel.org>, ext2-devel@lists.sourceforge.net
    
    

    Hi!

    > > Currently, you get fsck "just to be sure" once every ~30 clean
    > > mounts or ~30 hard shutdowns. I believe that hard shutdown is way more
    > > likely to cause some disk corruption, so it would make sense to fsck
    > > more often when system is hit by hard shutdown.
    > >
    > > What about this patch?
    > >
    > > @@ -1484,9 +1485,11 @@
    > > * root first: it may be modified in the journal!
    > > */
    > > if (!test_opt(sb, NOLOAD) &&
    > > - EXT3_HAS_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_HAS_JOURNAL)) {
    > > - if (ext3_load_journal(sb, es))
    > > - goto failed_mount2;
    > > + EXT3_HAS_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_HAS_JOURNAL)) { {
    > > + mount_cost = 5;
    > > + if (ext3_load_journal(sb, es))
    > > + goto failed_mount2;
    > > + }
    >
    > AFAICS, this just means that if you have an ext3 filesystem
    > (i.e. has_journal) that you will fsck 5x as often, not so great. You
    > should instead check for INCOMPAT_RECOVER instead of HAS_JOURNAL.

    Oops, you are right. Updated patch is attached.

    > Instead, you could change this to only increment the mount count after
    > a clean unmount 20% of the time (randomly). Since most people bitch
    > about the full fsck anyways this is probably the better choice than
    > increasing the frequency of checks and forcing the users to change the
    > check interval to get the old behaviour.

    Nice hack.... would that be acceptable?
                                                                            Pavel

    -- 
    People were complaining that M$ turns users into beta-testers...
    ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
    -
    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: Adrian Bunk: "[patch] 2.6.8-rc1-mm1: 8139too: uninline rtl8139_start_thread"

    Relevant Pages

    • Re: BIOS overwritten during resume (was: Re: Asus L5D resume on battery power)
      ... >> and you probably need to fix those, ... I think I'll just port the Nigel's patch to x86-64. ... People were complaining that M$ turns users into beta-testers... ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: smp/swsusp done right
      ... >> Test this if you can, and report any problems. ... No, not in final patch. ... People were complaining that M$ turns users into beta-testers... ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [Ext2-devel] Re: ext3: bump mount count on journal replay
      ... Updated patch is attached. ... I don't think you'll get complaints from users if it is ... People were complaining that M$ turns users into beta-testers... ... 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/ ...
      (Linux-Kernel)
    • Re: [Ext2-devel] Re: ext3: bump mount count on journal replay
      ... Updated patch is attached. ... >> about the full fsck anyways this is probably the better choice than ... Andreas Dilger ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [patch] SUSPEND_PD_PAGES-fix
      ... >> send a patch later today. ... People were complaining that M$ turns users into beta-testers... ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)