TRIM support for UFS?

Pawel Jakub Dawidek pjd at FreeBSD.org
Wed Dec 8 22:33:37 UTC 2010


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                       http://www.wheelsystems.com
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20101208/299154a7/attachment.pgp


More information about the freebsd-fs mailing list