Date: Thu, 29 Nov 2018 10:52:35 -0700 From: Warner Losh <imp@bsdimp.com> To: lists@jnielsen.net Cc: Eugene Grosbein <eugen@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r341232 - in head/usr.bin: . trim Message-ID: <CANCZdfrpMHncR2cigSpJZtdxBuEfHyK8zbKgV7d=up-PWTtkNA@mail.gmail.com> In-Reply-To: <9812F670-DD3D-4A56-A826-28B4A055F488@jnielsen.net> References: <201811291421.wATELQbx059318@repo.freebsd.org> <9812F670-DD3D-4A56-A826-28B4A055F488@jnielsen.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 29, 2018 at 10:04 AM John Nielsen <lists@jnielsen.net> wrote: > > On Nov 29, 2018, at 7:21 AM, Eugene Grosbein <eugen@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=E2=80=99m curious, would this also be useful for virtual disks or SAN/N= AS > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrpMHncR2cigSpJZtdxBuEfHyK8zbKgV7d=up-PWTtkNA>