From owner-svn-src-head@FreeBSD.ORG Sat Apr 30 07:27:00 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67AB61065670; Sat, 30 Apr 2011 07:27:00 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8FCE88FC0A; Sat, 30 Apr 2011 07:26:58 +0000 (UTC) Received: by bwz12 with SMTP id 12so5128545bwz.13 for ; Sat, 30 Apr 2011 00:26:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=CC201cNTqnpXrqNLE+caOxXXTLUFXsuuDHYcHNDIfzQ=; b=MKbPaCiJ177Qg3SFM56kcUi/RI0RSoFft0hIus/a04nZAECD9nRRwX+gqLlW9bJnVs 7dnFZbO/kpTTX776opJbOUpdbX3A9JeGt+u6daDA2m9d8h6OWFccNmoeE+8rIF+hoSLa plaPffHgqm7TVoUP3Vopts3IaukoL97RtqAOI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=PjqhkoP2Tdb8O+LRrVgTb7KKC5tH6rDX3IGCHT1W1JIktRnO0qAGI/sPHtOh3k9TVm OpKcE7nZI2xcaBv7b8oss4ghUZP8M3dn8CSqwfJqVmbQ0i6U1FD/6SeVclO3cxWaP9a/ iiD4x/rN0x64aN7fQ+18pq8kOxQlzaQLGvwvo= Received: by 10.204.20.147 with SMTP id f19mr849064bkb.163.1304148418172; Sat, 30 Apr 2011 00:26:58 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id l1sm2024749bkl.1.2011.04.30.00.26.56 (version=SSLv3 cipher=OTHER); Sat, 30 Apr 2011 00:26:57 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DBBB9B0.5080307@FreeBSD.org> Date: Sat, 30 Apr 2011 10:26:40 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Dag-Erling Smorgrav References: <201104292300.p3TN0N8N019287@svn.freebsd.org> In-Reply-To: <201104292300.p3TN0N8N019287@svn.freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221233 - head/sbin/fsck_ffs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Apr 2011 07:27:00 -0000 Dag-Erling Smorgrav wrote: > Author: des > Date: Fri Apr 29 23:00:23 2011 > New Revision: 221233 > URL: http://svn.freebsd.org/changeset/base/221233 > > Log: > 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 Thank you! Not exactly scientific test, but my laptop survived it fine with 10% and 50% of free space. And it indeed restored the write speed, respecting that I had no kernel TRIM support enabled there before. For additional check of the drive's block remapper behavior I've written all free space with file of zeroes and deleted it -- after reboot I am still here. :) -- Alexander Motin