svn commit: r341232 - in head/usr.bin: . trim

Warner Losh imp at bsdimp.com
Thu Nov 29 17:52:48 UTC 2018


On Thu, Nov 29, 2018 at 10:04 AM John Nielsen <lists at jnielsen.net> wrote:

> > On Nov 29, 2018, at 7:21 AM, Eugene Grosbein <eugen at FreeBSD.org> wrote:
> >
> > Author: eugen
> > Date: Thu Nov 29 14:21:26 2018
> > New Revision: 341232
> > URL: https://svnweb.freebsd.org/changeset/base/341232
> >
> > Log:
> >  Add new small tool trim(1) to delete contents for blocks on flash
> >  based storage devices that use wear-leveling algorithms.
> >
> >   [snip]
>
> > +.Sh DESCRIPTION
> > +The
> > +.Nm
> > +utility erases specified region of the device.
> > +It is only relevant for flash based storage devices that use
> wear-leveling
> > +algorithms.
>
> I’m curious, would this also be useful for virtual disks or SAN/NAS
> devices backed by thinly-provisioned storage?
>

Yes. It is. Any device that supports BIO_DELETE the trim will work on.

It could work on files within a filesystem, but not in its current state.
ftruncate, however, is a better match there. None of the filesystems
support the DIOCDELETE ioctl.

Warner


More information about the svn-src-head mailing list