Re: Kernel 2.6.6: Removing the last large file does not reset filesystemproperties

From: Bill Davidsen
Date: Tue May 11 2004 - 18:30:56 EST

John McGowan wrote:
On Tue, 11 May 2004, Andrew Morton wrote:

John McGowan <jmcgowan@xxxxxxxx> wrote:

I think this is really an e2fsck/initscript problem.

fsck saw that there were no large files on the fs, then fixed up the
superblock to say that then returned an exit code which says "I modified
the fs".

The initscripts see that exit code and have a heart attack.

Yes. But why did it have to modify the file system/superblock/properties?
Should the file system have had to be modified (relying upon
fsck to fix the "largefile" property when next it is run)?

What should happen is that fsck returns an exit code which says "I modified
the fs, but everythig is OK". And the initscripts should say "oh, cool"
and keep booting.

Actually, they do, if it isn't the root partition (if I create/delay the
large file from another partition it gives a message and continues - but
for the root partition, the initscript, with an exit code greater than 1
drops one to a root prompt for "maintenance" - and with my /usr on a
different partition and seeing a bunch of "id not found"
"test not found" messages ... for a few minutes I was a bit flustered.
It is easy enough to modify the init script to do a reboot on exit
code 2).

(Fedora Core1 initscript on mounting the root partition:

# A return of 2 or higher means there were serious problems.
echo $"*** An error occurred during the file system check."
echo $"*** Dropping you to a shell; the system will reboot"
echo $"*** when you leave the shell."
str=$"(Repair filesystem)"
PS1="$str \# # "; export PS1

(the sulogin login message is:
"Give root password for maintenance")

I don't know whether the problem lies with fsck or initscripts.

I would say the problem is in the interface. There should be one more state in the exit codes, and initscripts should handle that:

0 - okay
1 - fixes but okay to continue
2 - fixes and reboot to update in-core info
3 - help! Uncorrected errors.

fsck does fix it. Or should the removal of the last large file have
resulted in the change without the mismatch between the "largefile"
property being set with no large files?

If the system was shutdown cleanly, then there should not have been this problem in the first place. Of course if you are testing recovery by doing sync and hitting the switch, well actually that should still work, the metadata should be correct, right?

It's a small annoyance (no damage to the file system itself), no more.

I know what's happening and how to patch the initscript to get an
automatic reboot on exit code 2. Is that the proper way to handle it?

Absolutely not! It will leave you in an endless loop of rebooting!

-bill davidsen (davidsen@xxxxxxx)
"The secret to procrastination is to put things off until the
last possible moment - but no longer" -me
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at