Date: Fri, 29 Apr 2011 23:00:23 +0000 (UTC) From: Dag-Erling Smorgrav <des@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sbin/fsck_ffs fsck.h fsck_ffs.8 fsutil.c main.c pass5.c Message-ID: <201104292300.p3TN0hej068236@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
des 2011-04-29 23:00:23 UTC FreeBSD src repository Modified files: sbin/fsck_ffs fsck.h fsck_ffs.8 fsutil.c main.c pass5.c Log: SVN rev 221233 on 2011-04-29 23:00:23Z by des 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 Revision Changes Path 1.47 +2 -0 src/sbin/fsck_ffs/fsck.h 1.46 +20 -2 src/sbin/fsck_ffs/fsck_ffs.8 1.32 +16 -1 src/sbin/fsck_ffs/fsutil.c 1.64 +6 -2 src/sbin/fsck_ffs/main.c 1.47 +23 -2 src/sbin/fsck_ffs/pass5.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104292300.p3TN0hej068236>