Date: Thu, 23 Aug 2018 13:11:58 +0200 From: Jan Henrik Sylvester <me@janh.de> To: bob prohaska <fbsd@www.zefox.net>, Mark Millard <marklmi@yahoo.com> Cc: FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: CFT: TRIM Consolodation on UFS/FFS filesystems Message-ID: <60ebe062-dfa8-66e2-1e65-de18918eb4a1@janh.de> In-Reply-To: <20180823033827.GA89801@www.zefox.net> References: <170C703D-AA75-4EC9-93BA-D2CF3A7D6D5E@yahoo.com> <20180823033827.GA89801@www.zefox.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 8/23/18 5:38 AM, bob prohaska wrote: > On Tue, Aug 21, 2018 at 06:47:19PM -0700, Mark Millard wrote: >> >> I've used a SSD both directly via SATA and via a USB enclosure, >> the same partitions/file systems across the uses. Only when it >> was SATA-style-use did TRIM work. >> > This is likely the key to my question. If USB blocks the TRIM service > the behavior of the device doesn't matter. This is kind of off-topic in this thread about UFS, but if you investigate TRIM on USB enclosures: Some of them advertise TRIM support, for example Startech SM21BMU31C3 (based on Asmedia ASM1351 USB 3.1 Gen 2 chipset), but that is not the whole story. Using the UASP protocol, they pass on the ata trim command, which is used by Windows for NTFS trim support, but they do not pass the SCSI UNMAP command, which is used by Linux. Sorry, I have not yet tested this on FreeBSD, but on Linux, security erase of the entire SSD works with the enclosure I have just mentioned, whereas trimming of a filesystem (fstrim) does not work. I have had exactly one enclosure that offered trimming on filesystems on Linux: I have bought it on Ebay directly from China and I think it is based on JMicron JMS567 USB 3.0 chipset. I have not found an mSATA enclosure from any vendor in Europe that has this chipset. Of course, having the right chipset is not enough, either, the firmware also has to support it. Please, correct me if I am wrong, but I think FreeBSD does not implement UASP, yet. Hence, I doubt there will be any kind of trim support for any USB-SATA bridge on FreeBSD and even security erase will probably not be passed on. Cheers, Jan Henrik
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?60ebe062-dfa8-66e2-1e65-de18918eb4a1>