[haiku-bugs] Re: [Haiku] #10336: TRIM / fstrim can destroy data on SSD's when executed

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Sun, 07 Feb 2021 11:48:42 -0000

#10336: TRIM / fstrim can destroy data on SSD's when executed
---------------------------+----------------------------
  Reporter:  kallisti5     |      Owner:  axeld
      Type:  bug           |     Status:  in-progress
  Priority:  high          |  Milestone:  Unscheduled
 Component:  Drivers/Disk  |    Version:  R1/Development
Resolution:                |   Keywords:  TRIM fstrim
Blocked By:                |   Blocking:
  Platform:  All           |
---------------------------+----------------------------
Comment (by pulkomandy):

 Replying to [comment:24 pulkomandy]:

I have set up a machine for testing purposes. Thinkpad X200 with
 Kingston 60GB SSD, SV300S37A60G. I'm using a 3GB partition near the start
 of the disk, on which I installed Haiku. I am trimming the boot volume,
 without other activity happening.

So far I have not managed to corrupt the drive this way. However, the
 trim command will time out. The HDD led stays on for some time, but then
 the command is aborted.

{{{
port reset: port 0 undergoing COMRESET
ExecuteAtaRequest port 0: device timeout
sata_request::abort called for command 0x06
trim failed (64 ranges)!
}}}

 Found out that I still have that particular SSD around (now in a different
 machine). Same problem still happens as of hrev54949 (after re-enabling
 trim support in the AHCI driver).

 I increased the timeout from 20 to 2000 seconds (just in case the problem
 was indeed that we didn't wait long enough). It stil timed out, and then I
 got a KDL, null pointer dereference in BFS BlockAllocator::Trim.
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/10336#comment:64>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: