4 ms·
What happens if the remaining space is TRIMMED but routinely accessed? (for example by dd, read only)
by howbadisthat 2y ago
What happens if the remaining space is TRIMMED but routinely accessed? (for example by dd, read only)
- wtallis 2y agoIf a logical block address is not mapped to any physical flash memory addresses, then the SSD can return zeros for a read request immediately, without touching the flash.
- Dwedit 2y agoYou read zeroes.
- BeeOnRope 2y agoNot guaranteed by default for NVMe drives. There's an NVMe feature bit for "Read Zero After TRIM" which if set for a drive guarantees this behavior but many drives of interest (2024) do not set this.
- Dwedit 2y agoHmmm, when I quick-formatted a drive (which TRIMs the whole thing), then tried reading it back in a disk hex editor, I just saw zeroes.
- BeeOnRope 2y agoIt seems like that would be a likely common behavior for the FTL, but other options are possible (e.g., reading the old blocks) and it wasn't guaranteed by the spec, which is why they added this NVMe flag (so-called "DZAT") so that you can actually rely on it.