Re: 2.4.14 still not making fs dirty when it should

Andrew Morton
2001-11-29T20:24:00Z

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?

-