← Back to context

Comment by howbadisthat

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.

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 →