TRIM support (same bug as linux?)

Warren Block wblock at wonkity.com
Wed Sep 9 17:17:20 UTC 2015


On Wed, 9 Sep 2015, Jan Bramkamp wrote:

> On 09/09/15 01:15, FF wrote:
>> I'm asking a pretty vague question and I apologize in advance, not trying
>> to troll.
>> 
>> The question has to do with whether FreeBSD is using TRIM the same way as
>> recent Linux kernels.
>> 
>> https://blog.algolia.com/when-solid-state-drives-are-not-that-solid/ seems
>> to imply that there are instabilities that can occur. Trying to avoid
>> duplicating effort if this has already been addressed or if its a complete
>> dead alley because there isn't a commonality.
>
> At first the leading theory was that Linux triggered a firmware bug in the 
> SSDs or that a bug in the handling of queued TRIM operations is responsible. 
> The real culprit was a bug in the code for linear mdraid volumes causing the 
> wrong blocks to be unmapped with TRIM.

They have test code to duplicate the bug here:
https://github.com/algolia/trimtester

The trim_periodic.sh script uses fstrim, a Linux command that "is used 
on a mounted filesystem to discard (or "trim") blocks which are not in 
use by the filesystem."  In a batch.  No idea how often that is used in 
real life.


More information about the freebsd-fs mailing list