Refer to this archived thread for context: http://forums.fedoraforum.org/showthread.php?t=278455
I followed the configuration changes outlined in that thread in my F17 installation and it seems I may now have discard support on my luks partition which is on SSD.
# cryptsetup status luks-cc282d6b-3831-448d-afa8-a53b30ee98e6
/dev/mapper/luks-cc282d6b-3831-448d-afa8-a53b30ee98e6 is active and is in use.
keysize: 512 bits
offset: 4096 sectors
size: 330133504 sectors
So I tried manually running fstrim:
# time fstrim -v /
/: 132014465024 bytes were trimmed
Not sure I trust the number of bytes trimmed since its showing about 130G !!
So how do I perform an actual test that I can see the TRIM occur on the encrypted block device? eg: all zeroes
UPDATE: painstakingly I went and followed through all the offsets of all the layers and was able to read a file sector and determine that yes TRIM is working on my LUKS partition.
Hope we see a tool to do this at some point.