Re: 2.4.14 still not making fs dirty when it should

Andrew Morton (akpm@zip.com.au)
Thu, 29 Nov 2001 12:22:49 -0800


Mike Castle wrote:
>
> On Thu, Nov 29, 2001 at 11:54:57AM -0800, Andrew Morton wrote:
> > Pavel Machek wrote:
> > >
> > > Hi!
> > >
> > > I still can mount / read/write, press reset, and not get fsck on next
> > > reboot. That strongly suggests kernel bug to me.
> >
> > aargh. I thought that was fixed. How's this look?
>
> I'm curious:
>
> Why would you WANT this?
>
> I always thought that if you didn't make any fs changes, then it should NOT
> fsck.
>

What happens is that the superblock is altered in-memory
to say "the filesystem needs checking", but it's not written
out to disk.

So other things can come in, alter the fs, get written out *before*
the superblock and then you crash. fsck won't be run, and the
filesystem is left in an inconsistent state.

This actually happens. On a stock RH7.1 setup, you can
hit reset as soon as you get the first login prompt. fsck
will not be run on reboot. If you run it by hand, fsck
finds errors.

Andreas, my one-liner was, umm, hasty. I think you had
a decent fix for this?

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