#10336: TRIM / fstrim can destroy data on SSD's when executed
----------------------------+----------------------------
Reporter: kallisti5 | Owner: axeld
Type: bug | Status: in-progress
Priority: blocker | Milestone: R1/beta1
Component: Drivers/Disk | Version: R1/Development
Resolution: | Keywords: TRIM fstrim
Blocked By: | Blocking:
Has a Patch: 1 | Platform: All
----------------------------+----------------------------
Comment (by pulkomandy):
What I did to test this (but it is a destructive test):
1) with dd, clear a section of the partition with all 0xE5 (or some other
value, or use data from /dev/random)
2) format the partition as bfs (only some sectors are modified)
3) run fstrim on the partition
If fstrim works properly, the fixed value used at step 1 should be gone
from the sectors, and the default erased value of the disk should be there
instead (usually 00 or FF). You can check this with DiskProbe.
Note that current SSDs do well even without trimming, there is a
performance loss but not a lifetime reduction as it used to be.
--
Ticket URL: <https://dev.haiku-os.org/ticket/10336#comment:35>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.