[zfs-discuss] Re: TRIM support?

Gregor Kopka gregor at kopka.net
Thu Mar 1 10:51:42 EST 2012


Am 01.03.2012 09:03, schrieb Stephane Chazelas:
> 2012-02-29 23:08:08 -0800, Christ Schlacta:
>> Is it possible to add TRIM support to the zvol layer?  I know
>> because of COW that it may not always be useful, but it would be
>> nice to be able to mark blocks of data as "no longer referenced", so
>> that when appropriate (IE: when deleting snapshots) the space that
>> would otherwise be unused but referenced can instead be freed.
>> There exists a spec for it, it'd be nice to be able to use it :)
> It's been added recently and is available in the latest ppa. And
> I did verify that it works (BLKDISCARD ioctl works, so I expect
> mounting a FS with -o discard on a zvol should work as well).
>
Does it work for CACHE and LOG devices based on SSD, since they need 
this to stay alive and snappy for a reasonable amount of time.

On pool import a TRIM over the whole CACHE block device would make sense 
too, since L2ARC contents do not persist over a reboot anyway...

Gregor



More information about the zfs-discuss mailing list