Re: What does TRIM/discard in RAID do ?
From: Reindl Harald <hidden>
Date: 2023-01-15 12:13:46
Am 15.01.23 um 13:00 schrieb Pascal Hambourg:
Linux RAID supports TRIM/discard, but what does it do exactly ? Does it only pass-through TRIM/discard information to the underlying devices or can it also store information about which blocks contain valid data in the superblock metadata?
pass-through TRIM/discard it makes no sense to store that on the RAID layer - if someone is th eposition to store the information to reduce the fstrim load after a reboot it's the filesystem on-top "filesystem -> luks -> lvm -> mdadm -> device" is a possible discard chain so why should mdadm store that information if the filesystem knows "i notified that the blocks for deleteded file X are no longer in use" it can store that somewhere and none of the other layers would need to know because there won't be any discard request in the future