background_fsck and kernel without SOFTUPDATES

Oleg V. Naumann oleg at reis.zp.ua
Fri Mar 26 12:09:03 PST 2004


	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 at 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


More information about the freebsd-current mailing list