From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 15 18:44:04 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9027816A4CE for ; Thu, 15 Apr 2004 18:44:04 -0700 (PDT) Received: from mxfep01.bredband.com (mxfep01.bredband.com [195.54.107.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 719A043D49 for ; Thu, 15 Apr 2004 18:44:03 -0700 (PDT) (envelope-from peter.schuller@infidyne.com) Received: from scode.mine.nu ([213.113.221.56] [213.113.221.56]) by mxfep01.bredband.com with ESMTP id <20040416014402.HUZN7099.mxfep01.bredband.com@scode.mine.nu> for ; Fri, 16 Apr 2004 03:44:02 +0200 Received: from localhost (localhost [127.0.0.1]) by scode.mine.nu (Postfix) with ESMTP id 8287313EDD7 for ; Fri, 16 Apr 2004 03:44:17 +0200 (CEST) From: Peter Schuller To: freebsd-hackers@freebsd.org Date: Fri, 16 Apr 2004 03:44:16 +0200 User-Agent: KMail/1.6 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200404160344.16704.peter.schuller@infidyne.com> Subject: fsck_ffs: bgfsck fails becuase FS_UNCLEAN is not set X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2004 01:44:04 -0000 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 ' Key retrieval: Send an E-Mail to getpgpkey@scode.org E-Mail: peter.schuller@infidyne.com Web: http://www.scode.org