Skip to contentSkip to conversation

How will ATA-TRIM be handled?

dm-crypt Christian Tschabuschnig 2 participants 2 messages Oct 3, 2009 – Oct 4, 2009

lore
Share & tools
lore
#0 lore raw

Hello,

I don't know much about the internals of filesystems or devicemapper but I know that the kernel supports ATA-TRIM and that ext4 supports or will soon support it.

My question is: What happens, if a dm-crypt-layer is between the filesystem and the real block-device? Will the trim be passed through, or will it be discarded?

Optimally, i think, both should be possible. Passing through the information will improve performance and lifetime of a SSD and discarding it would give less information to an attacker since the SSD will return zeroes on LBAs that are not mapped.

Regards,
Christian

#1 lore raw
Quoted 3 lines · Christian Tschabuschnig

My question is: What happens, if a dm-crypt-layer is between the filesystem and the real block-device? Will the trim be passed through, or will it be discarded?

It guess it will be passed through. I'm using btrfs on a SSD which is encrypted with LUKS/dmcrypt, and it works great. Btrfs uses ata trim quite a while.