Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Nov 2018 09:34:23 +0100 (CET)
From:      Wojciech Puchar <wojtek@puchar.net>
To:        Eugene Grosbein <eugen@grosbein.net>
Cc:        Freebsd hackers list <freebsd-hackers@freebsd.org>
Subject:   Re: TRIM utility
Message-ID:  <alpine.BSF.2.20.1811230934160.39565@puchar.net>
In-Reply-To: <7699de57-d903-1d61-ee42-062ed312b20d@grosbein.net>
References:  <7699de57-d903-1d61-ee42-062ed312b20d@grosbein.net>

next in thread | previous in thread | raw e-mail | index | archive | help
thanks. very useful tool

On Fri, 23 Nov 2018, Eugene Grosbein wrote:

> Hi!
>
> I found we have no utility capable to perform TRIM for the whole SSD device
> or arbitrary part of it, so I wrote simple one. I can't think of nice name
> for it, so proposal are welcome! Draft name is "erase".
>
> I ask for pre-commit code review, too.
> The code is tested with TRIM-capable SSD and non-capable other devices.
>
> Currently it has four options, all of them are, hmm, optional:
>
> -b: to specify offset from the beginning of the device for trimmed region instead of default 0;
> -l: to specify offset from the "-b" margin - length - for trimmed region instead of whole device;
> -r rfile: for alternative way to specify length as length of referenced file;
> -v: for verbose mode that shows final values for the beginning offset and length.
>
> Later options override previous ones. Then it expects a list of device names as arguments:
>
> erase ada0
> erase /dev/ada0s1
> erase -b 4096 -r file.img -v /dev/da0 /dev/da1 /dev/da2
>
> The code:
>
> http://www.grosbein.net/freebsd/erase.c
> http://www.grosbein.net/freebsd/Makefile.erase
>
> My "mandoc" skills are very poor and English is not my native language,
> so any help with manual page creation will be appreciated.
>
> Eugene Grosbein
>
> P.S. I realized that our kernel-level TRIM support has no connection to cam(4) nor to geom(4),
> so distinct utility instead of addition to camcontrol(8) or geom(8).
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.1811230934160.39565>