fsck_y_enable: use -C

Andriy Gapon avg at icyb.net.ua
Mon Jun 1 13:20:39 UTC 2009


What about the following patch?
I believe that the idea behind fsck_y_enable is to try to make unattended systems
with rw filesystems as recoverable as possible at the cost of potential damage to
the data. The new "-C" option should not interfere with this goal, but should
reduce recovery time, because currently fsck -y checks *all* filesystems from
fstab, even those that are ro or clean:

-C      Check if the “clean” flag is set in the superblock and skip file
        system checks if file system was properly dismounted and marked
        clean.


diff --git a/etc/rc.d/fsck b/etc/rc.d/fsck
index bf51089..c0cb359 100755
--- a/etc/rc.d/fsck
+++ b/etc/rc.d/fsck
@@ -45,7 +45,7 @@ fsck_start()
 		8)
 			if checkyesno fsck_y_enable; then
 				echo "File system preen failed, trying fsck -y."
-				fsck -y
+				fsck -y -C
 				case $? in
 				0)
 					;;

-- 
Andriy Gapon


More information about the freebsd-current mailing list