Comment by howbadisthat
2 years ago
What happens if the remaining space is TRIMMED but routinely accessed? (for example by dd, read only)
2 years ago
What happens if the remaining space is TRIMMED but routinely accessed? (for example by dd, read only)
If 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.
Does the mapping happen on first write? Is TRIM then a command that signals the SSD to unmap that block?
Yes.
You read zeroes.
Not 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.
Hmmm, 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.
1 reply →