Re: Kernel 2.6.6: Removing the last large file does not resetfilesystem properties

From: John McGowan
Date: Tue May 11 2004 - 08:01:59 EST


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
sulogin

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

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

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?

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?

Regards from:

John McGowan | jmcgowan@xxxxxxxx [Internet Channel]
| jmcgowan@xxxxxxxx [COIN]
--------------+-----------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/