freebsd-dev/sbin/fsck_ffs
Dag-Erling Smørgrav 8d3dfc2691 Add an -E option to mirror newfs's. The idea is that if you have a system
that was built before ffs grew support for TRIM, your filesystem will have
plenty of free blocks that the flash chip doesn't know are free, so it
can't take advantage of them for wear leveling.  Once you've upgraded your
kernel, you enable TRIM on the filesystem (tunefs -t enable), then run
fsck_ffs -E on it before mounting it.

I tested this patch by half-filling an mdconfig'ed filesystem image,
running fsck_ffs -E on it, then verifying that the contents were not
damaged by comparing them to a pristine copy using rsync's checksum
functionality.  There is no reliable way to test it on real hardware.

Many thanks to mckusick@, who provided the tricky parts of this patch and
reviewed the final version.

Reviewed by:	mckusick@
MFC after:	3 weeks
2011-04-29 23:00:23 +00:00
..
dir.c Eliminate linked list used to track inodes with an initial link 2004-10-08 20:44:47 +00:00
ea.c Mechanical whitespace cleanup. 2011-04-27 02:55:03 +00:00
fsck_ffs.8 Add an -E option to mirror newfs's. The idea is that if you have a system 2011-04-29 23:00:23 +00:00
fsck.h Add an -E option to mirror newfs's. The idea is that if you have a system 2011-04-29 23:00:23 +00:00
fsutil.c Add an -E option to mirror newfs's. The idea is that if you have a system 2011-04-29 23:00:23 +00:00
gjournal.c - Merge soft-updates journaling from projects/suj/head into head. This 2010-04-24 07:05:35 +00:00
inode.c Mechanical whitespace cleanup. 2011-04-27 02:55:03 +00:00
main.c Add an -E option to mirror newfs's. The idea is that if you have a system 2011-04-29 23:00:23 +00:00
Makefile - Merge soft-updates journaling from projects/suj/head into head. This 2010-04-24 07:05:35 +00:00
pass1.c Add some error messages suggested in PR bin/138043. The code to 2010-01-07 01:10:49 +00:00
pass1b.c The got_siginfo = 0 should have been got_sigalarm=0 to match the other 2004-10-10 06:37:56 +00:00
pass2.c Mechanical whitespace cleanup. 2011-04-27 02:55:03 +00:00
pass3.c Eliminate linked list used to track inodes with an initial link 2004-10-08 20:44:47 +00:00
pass4.c Add support to background fsck to delete zero-length directories. 2010-05-20 06:05:40 +00:00
pass5.c Add an -E option to mirror newfs's. The idea is that if you have a system 2011-04-29 23:00:23 +00:00
setup.c In checker, read journal by sectors. 2011-02-12 13:17:14 +00:00
suj.c Mechanical whitespace cleanup. 2011-04-27 02:55:03 +00:00
utilities.c Mechanical whitespace cleanup. 2011-04-27 02:55:03 +00:00