CFT: TRIM Consolodation on UFS/FFS filesystems

Kirk McKusick mckusick at mckusick.com
Fri Aug 24 00:22:27 UTC 2018


> Date: Thu, 23 Aug 2018 17:06:37 -0700
> From: bob prohaska <fbsd at www.zefox.net>
> To: Kirk McKusick <mckusick at mckusick.com>
> Cc: FreeBSD Filesystems <freebsd-fs at FreeBSD.org>, freebsd-arm at freebsd.org,
>         bob prohaska <fbsd at www.zefox.net>
> Subject: Re: CFT: TRIM Consolodation on UFS/FFS filesystems
> 
> Using:
> 
> FreeBSD 12.0-ALPHA2 #12 r338122: Tue Aug 21 14:26:18 PDT 2018
> 
> Alas, no luck. On mount TRIM isn't supported:
> 
> WARNING: /usr: TRIM flag on fs but disk does not support TRIM
> 
> Using tunefs on the microSD produced a different refusal:
> # tunefs -t enable /dev/mmcsd0s2a
> tunefs: issue TRIM to the disk set
> tunefs: /dev/mmcsd0s2a: failed to open disk for writing
> I tried with the device both ro and rw, same error. I
> expected "not supported", rather than "failed to open".
> If there's a mistake please tell me.

Assuming that /dev/mmcsd0s2a is your /usr then when the filesystem
was ro it should have allowed the open to work. But given that
you already had the flag set when you attempted the mount of /usr
it would have made no difference even if you could have set it.

> Not sure if this is true of all possible storage devices, but
> the Sandisk Ultra microSD and Sandisk Extreme USB appear to be
> non-starters.
> 
> Thanks very much for your help!
> 
> bob prohaska

Based on the comments by Mark Millard, it sounds like the
Raspberry Pi 3 uses USB 2.0 which definitely has no ability
to pass through TRIM to the underlying device (even if that
device can support TRIM). There is some speculation that
USB 3.1 has support for passing through TRIM commands, but
I did not see it in my cursory inspection of the USB Spec.

So, conclusion is that you will not be able to use TRIM on 
your Raspberry Pi 3.

	Kirk McKusick


More information about the freebsd-fs mailing list