From owner-freebsd-fs@FreeBSD.ORG Wed Dec 8 22:33:37 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 3A110106564A for ; Wed, 8 Dec 2010 22:33:37 +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 C21518FC16 for ; Wed, 8 Dec 2010 22:33:36 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id C290B45C8A; Wed, 8 Dec 2010 23:33:34 +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 423C745B36; Wed, 8 Dec 2010 23:33:29 +0100 (CET) Date: Wed, 8 Dec 2010 23:33:27 +0100 From: Pawel Jakub Dawidek To: Kirk McKusick Message-ID: <20101208223327.GD1884@garage.freebsd.pl> References: <20101208214909.GH33073@deviant.kiev.zoral.com.ua> <201012082223.oB8MNqGV020879@chez.mckusick.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JwB53PgKC5A7+0Ej" Content-Disposition: inline In-Reply-To: <201012082223.oB8MNqGV020879@chez.mckusick.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.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: freebsd-fs@freebsd.org, Oliver Fromme 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: Wed, 08 Dec 2010 22:33:37 -0000 --JwB53PgKC5A7+0Ej Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 08, 2010 at 02:23:52PM -0800, Kirk McKusick wrote: > The above patch looks good though I would do it unconditionally > (e.g., also for snapshots). It seems sensible to make it conditional > on a sysctl variable so that folks could experiment with it more > easily. And I would leave it off by default as non-SSD disks are > unlikely to benefit from it. If it does prove useful for SSD disks > then I would make it conditional on a filesystem flag so that it > is possible to enable it on a filesystem-by-filesystem basis (e.g., > on for filesystems on the SSD and off for the rest). We already have a flag for disks: DISKFLAG_CANDELETE, which tells if the disk support TRIM or not. Next we should add BIO_GETATTR attribute for DISK class to return true if TRIM is supported. This way UFS can ask if TRIM is supported on mount and don't bother sending BIO_DELETE if it is not supported. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --JwB53PgKC5A7+0Ej Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk0AB7YACgkQForvXbEpPzShTQCdEkP+WCZcl+x7DX2SP/RsxdRH WboAoOAHVCwYe1VMjxRZQcY8ZKrw8vkI =TvTM -----END PGP SIGNATURE----- --JwB53PgKC5A7+0Ej--