Re: Possible bug with fs clean mask [was Re: [patch-2.3.99-pre7-6] O_SYNC Reactivation]

From: J.A. Sutherland (jas88@cam.ac.uk)
Date: Thu May 11 2000 - 07:48:45 EST


--On 11 May 2000, 11:00 +0200 Pavel Machek <pavel@ucw.cz> wrote:
> Hi!
>
>> > > I had a weird problem with 2.3.99-pre6:
>> > > If the kernel crashes a few seconds after mounting the root
>> > > filesystem read-write, then it won't fsck on reboot. It seems that
>> > > the "volume dirty" flag is not written immediately.
>> > > That feature saves a lot of time during debugging, but I have some
>> > > doubts that this is really a feature...
>> >
>> > This is not new with 2.3.99, I've seen it before. And now, I'm not
>> > sure it is a feature, either!
>>
>> Provided the dirty flag is written before any other write accesses are
>> performed, this is perfectly valid. It's only once the drive has been
>> written to that it is dirty - setting the flag before this would be a
>> bug, as would not setting it after this.
>>
>> Is it truly a "5 second delay", or similar, or does it just [correctly]
>> only set the dirty flag after the first write?
>
> I don't believe I did not do writes -- think atimes. I could believe
> that it was before first write reached disk -- but as controllers are
> free to reorder, it still seems buggy to me.

I'm not sure atimes would count, though. At least until the updated
inode with the new atime in is written to disk, the disk is still clean.

More to the point, there is some write buffering going on; perhaps
by the time you crash/reboot, the buffers haven't been flushed
yet, including the dirty flag?

James.

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



This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:17 EST