Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Mar 2004 22:08:56 +0200
From:      "Oleg V. Naumann" <oleg@reis.zp.ua>
To:        freebsd-current@freebsd.org
Subject:   background_fsck and kernel without SOFTUPDATES
Message-ID:  <20040326200856.GG21046@core.zp.ua>

next in thread | raw e-mail | index | archive | help

	Here is small problem. After removing 'options SOFTUPDATES'
from my kernel and rebooting I noticed message from fsck:
'kernel lacks background fsck support'. After that fsck 
leaves fs's in the inconsistent state. Yes, I know about dependency
between SOFTUPDATES and background fsck. But from my point of view it
looks better if /etc/rc.d/fsck will be fallback to the traditional
fsck way, if kernel lacks SOFTUPDATES support, may be in some
manner as that:

[root@core]/etc/rc.d# diff -u fsck.orig fsck
--- fsck.orig   Mon Jan 20 16:37:47 2003
+++ fsck        Fri Mar 26 20:48:02 2004
@@ -36,6 +36,11 @@
	echo "Starting file system checks:"
	case ${OSTYPE} in
	FreeBSD)
		/sbin/sysctl debug.max_softdeps > /dev/null 2>&1
+		if [ $? -ne 0 ]; then
+			echo "warning: SOFTUPDATES not supported, fallback to the foreground check"
+			background_fsck="NO"
+		fi
		if checkyesno background_fsck; then
			fsck -F -p
      else

It looks like fsck_ffs does check more that one sysctl which supports
SOFTUPDATES, may be 'debug.max_softdeps' is not better, but idea clear
here, I hope. I can fill a PR, if it is advisable.

-- 
NO37-RIPE



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040326200856.GG21046>