Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Dec 2010 23:33:27 +0100
From:      Pawel Jakub Dawidek <>
To:        Kirk McKusick <>
Cc:, Oliver Fromme <>
Subject:   Re: TRIM support for UFS?
Message-ID:  <>
In-Reply-To: <>
References:  <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help

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.

Pawel Jakub Dawidek                              
FreeBSD committer                         Am I Evil? Yes, I Am!

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v2.0.14 (FreeBSD)



Want to link to this message? Use this URL: <>