TRIM has been available in FreeBSD for mounted ZFS filesystems for quite a while, since ~Sep 2012 in 10-CURRENT[1]. I believe this is just a user space command for manually TRIM'ing in cases where it doesn't have explicit filesystem support.
[1]: https://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/all-ab...
FreeBSD is issuing TRIM in ZFS and UFS2 for quite a while.
When I was researching the topic, I learned that how TRIM is implemented on the drives, issuing it in bulk is more efficient than individually, so perhaps that's why the tool was added? Although looking at ZFS at least it looked like it also collects blocks that supposed to be TRIMmed and issues it periodically.
This is to erase an entire device. Filesystem support for trim has been present for many years.
Support for TRIM in ZFS, UFS (kernel), or fsck (userspace) has been in place for years, but there was no easy way to tell “TRIM all this whole device now”.
Re:FreeBSD 12.1
by LeoPanthera on Monday November 04, 2019 @02:40PM
(#21445564)
Trim support has been built in to ZFS since FreeBSD 10.
Presumably, this utility is useful for disks that are not ZFS formatted.
Is this replacing an older utility or is FreeBSD way behind on supporting SSDs?