Date: Thu, 23 Aug 2018 17:06:37 -0700 From: bob prohaska <fbsd@www.zefox.net> To: Kirk McKusick <mckusick@mckusick.com> Cc: FreeBSD Filesystems <freebsd-fs@FreeBSD.org>, freebsd-arm@freebsd.org, bob prohaska <fbsd@www.zefox.net> Subject: Re: CFT: TRIM Consolodation on UFS/FFS filesystems Message-ID: <20180824000637.GA2157@www.zefox.net> In-Reply-To: <201808230557.w7N5vvjj038580@chez.mckusick.com> References: <20180822004843.GA84687@www.zefox.net> <201808230557.w7N5vvjj038580@chez.mckusick.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 22, 2018 at 10:57:57PM -0700, Kirk McKusick wrote: > > Date: Tue, 21 Aug 2018 17:48:43 -0700 > > From: bob prohaska <fbsd@www.zefox.net> > > To: Kirk McKusick <mckusick@mckusick.com> > > Cc: FreeBSD Current <freebsd-current@FreeBSD.org>, > > FreeBSD Filesystems <freebsd-fs@FreeBSD.org>, > > bob prohaska <fbsd@www.zefox.net> > > Subject: Re: CFT: TRIM Consolodation on UFS/FFS filesystems > > X-ASK-Info: Message Queued (2018/08/21 17:55:39) > > X-ASK-Info: Confirmed by User (2018/08/21 18:47:17) > > > > > > Will the new feature be active on a Raspberry Pi 3 using flash > > on microSD and USB for file systems and swap? > > When you create the filesystem (using newfs) you need to specify > the -t option to request that it send TRIM commands to the underlying > media. If you have an existing filesystem, you can use the command > `tunefs -t enable <filesystem name or device>' to set the TRIM-request > flag. When you mount a fiesystem that has been told to send TRIM > commands, it will send an ioctl to the device asking if it supports > TRIM. If it replies that it does, then the TRIM commands will be > sent. If it does not then the kernel will print an error message > ``WARNING: <filesystem name>: TRIM flag on fs but disk does not > support TRIM'' or ``WARNING: <filesystem name>: TRIM flag on fs but > disk does not confirm that it supports TRIM''. If you get no message > when you mount, then the drive will accept TRIM commands. Now whether > it will do anything with them is not clear based on your quote below. > 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. 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180824000637.GA2157>