fsck_ffs: bgfsck fails becuase FS_UNCLEAN is not set
Peter Schuller
peter.schuller at infidyne.com
Thu Apr 15 18:44:04 PDT 2004
Hello,
I am trying to track down once and for all why I never seem to be able to
enjoy background filesystems on the root filesystem of any machine. I have
determined that checkfilesys() in fsck_ffs/main.c is bailing at the following
location, thus triggering foreground checking:
if ((mntp == NULL && sblock.fs_clean == 1) ||
(mntp != NULL && (sblock.fs_flags & FS_UNCLEAN) == 0))
exit(7); /* Filesystem clean, report it now */
And I have confirmed that it is because (sblock.fs_flags & FS_UNCLEAN) == 0.
The question is why[1]. I cannot find any code that unsets the FS_UNCLEAN flag
(except ckfini()).
I had expected the problem to be related to the root fs being mounted ro at
that point in the boot sequence, which can be worked around. But fsck_ffs is
not getting far enough to even check for that...
Any pointers would be greatly appreciated.
[1] The fs is in fact dirty due to a hard power-off and is detected as such
when foreground checking is invoked.
--
/ Peter Schuller, InfiDyne Technologies HB
PGP userID: 0xE9758B7D or 'Peter Schuller <peter.schuller at infidyne.com>'
Key retrieval: Send an E-Mail to getpgpkey at scode.org
E-Mail: peter.schuller at infidyne.com Web: http://www.scode.org
More information about the freebsd-hackers
mailing list