From owner-freebsd-fs@FreeBSD.ORG Fri Dec 10 00:58:48 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1421C106566B for ; Fri, 10 Dec 2010 00:58:48 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id AF67C8FC16 for ; Fri, 10 Dec 2010 00:58:47 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id C07DB45C89; Fri, 10 Dec 2010 01:58:45 +0100 (CET) Received: from localhost (89-73-192-49.dynamic.chello.pl [89.73.192.49]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 4BB9B456B1; Fri, 10 Dec 2010 01:58:40 +0100 (CET) Date: Fri, 10 Dec 2010 01:58:38 +0100 From: Pawel Jakub Dawidek To: Bakul Shah Message-ID: <20101210005838.GD1866@garage.freebsd.pl> References: <201012091813.oB9IDd2H078366@chez.mckusick.com> <20101210003749.3F7E15B92@mail.bitblocks.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ylS2wUBXLOxYXZFQ" Content-Disposition: inline In-Reply-To: <20101210003749.3F7E15B92@mail.bitblocks.com> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT amd64 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.1 required=4.5 tests=BAYES_00,OPTING_OUT, RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: Kirk McKusick , Oliver Fromme , freebsd-fs@freebsd.org Subject: Re: TRIM support for UFS? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Dec 2010 00:58:48 -0000 --ylS2wUBXLOxYXZFQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 09, 2010 at 04:37:48PM -0800, Bakul Shah wrote: > On Thu, 09 Dec 2010 10:13:39 PST Kirk McKusick w= rote: > > Other than the nit pointed out by Pawel, the diffs look good to me. > > You should consider adding the -t option to newfs so that the TRIM > > option can be specified at the time the filesystem is created (as > > a general rule, anything you can do with tunefs should also be > > possible with newfs). > >=20 > > I agree with your decision to let administrators opt-out of doing > > TRIM. If experience shows it to be generally useful to have it on, > > we can change the default to enabled later. If we do change the > > default to enabled, then we will want to delete the warning about TRIM > > not being supported by the underlying disk that you added at mount > > time as we would start getting a lot of them for all the non-SSD disks. >=20 > Would be nice if something like ftrim(fd, offset, size) or > trim(path, offsetm size) or TRIM file ioctl is added, to free > up blocks undelying a given range in a file. ftruncate can > delete blocks at the end but there is no facility to lose > blocks in the middle. Mainly handy for virtual disks and > databases (and would work nicely with SEEK_DATA, SEEK_HOLE). libgeom(3) provides: int g_delete(int fd, off_t offset, off_t length); --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --ylS2wUBXLOxYXZFQ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk0Bez0ACgkQForvXbEpPzTIDQCfV8O/HK/uNsslogvXeWYVfaaO qtsAnRCRdCZTCBUxhBhCCI4EDkwe/oPk =Irz9 -----END PGP SIGNATURE----- --ylS2wUBXLOxYXZFQ--