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

2018-11-29 Thread Warner Losh
On Thu, Nov 29, 2018 at 11:08 AM Eugene Grosbein wrote: > 30.11.2018 0:52, Warner Losh wrote: > > > 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. > > However, both of

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

2018-11-29 Thread Eugene Grosbein
29.11.2018 23:25, Warner Losh wrote: > There were many other things that I'd planned on commenting on once this hit > Phabricator. Is it possible to upload the whole new file to Phabricator and not as silly "diff" against /dev/null? ___ svn-src-head@

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

2018-11-29 Thread Eugene Grosbein
30.11.2018 0:52, Warner Losh wrote: > 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. However, both of UFS and ZFS issue BIO_DELETE while freeing their fs blocks, do

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

2018-11-29 Thread Warner Losh
On Thu, Nov 29, 2018 at 10:04 AM John Nielsen wrote: > > On Nov 29, 2018, at 7:21 AM, Eugene Grosbein 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

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

2018-11-29 Thread Conrad Meyer
Hi Eugene, On Thu, Nov 29, 2018 at 6:22 AM Eugene Grosbein 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 devi

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

2018-11-29 Thread Eugene Grosbein
29.11.2018 23:45, John Nielsen wrote: > I’m curious, would this also be useful for virtual disks or SAN/NAS devices > backed by thinly-provisioned storage? It won't work for for files residing on UFS/ZFS, if you mean that. And you can verify that easily: just make extra file and try to trim it

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

2018-11-29 Thread John Nielsen
> On Nov 29, 2018, at 7:21 AM, Eugene Grosbein 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

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

2018-11-29 Thread Warner Losh
On Thu, Nov 29, 2018 at 7:21 AM Eugene Grosbein 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