Date: Fri, 16 Apr 2004 03:44:16 +0200 From: Peter Schuller <peter.schuller@infidyne.com> To: freebsd-hackers@freebsd.org Subject: fsck_ffs: bgfsck fails becuase FS_UNCLEAN is not set Message-ID: <200404160344.16704.peter.schuller@infidyne.com>
next in thread | raw e-mail | index | archive | help
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@infidyne.com>' Key retrieval: Send an E-Mail to getpgpkey@scode.org E-Mail: peter.schuller@infidyne.com Web: http://www.scode.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404160344.16704.peter.schuller>