Comment 31 for bug 1338706

Revision history for this message
Dave Chiluk (chiluk) wrote :

I am running the EXT0DB6Q firmware on my 840 EVO + 3.13.0-53 , and think this issue may have cleared up somewhat.

The first time I ran
chiluk@beastly:/etc/cron.weekly$ sudo fstrim /home
I got.
^[OQfstrim: /home: FITRIM ioctl failed: Input/output error

The Log showed
[164782.716062] ata2.00: exception Emask 0x0 SAct 0x1000004 SErr 0x0 action 0x6 frozen
[164782.716079] ata2.00: failed command: WRITE FPDMA QUEUED
[164782.716081] ata2.00: cmd 61/60:10:28:b6:c0/00:00:1e:00:00/40 tag 2 ncq 49152 out
[164782.716081] res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[164782.716083] ata2.00: status: { DRDY }
[164782.716084] ata2.00: failed command: WRITE FPDMA QUEUED
[164782.716086] ata2.00: cmd 61/08:c0:00:1b:ce/00:00:30:00:00/40 tag 24 ncq 4096 out
[164782.716086] res 40/00:01:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[164782.716087] ata2.00: status: { DRDY }
[164782.716090] ata2: hard resetting link
[164783.036088] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[164783.036268] ata2.00: supports DRM functions and may not be fully accessible
[164783.036537] ata2.00: supports DRM functions and may not be fully accessible
[164783.036584] ata2.00: configured for UDMA/133
[164783.052085] ata2.00: device reported invalid CHS sector 0
[164783.052093] ata2: EH complete

It sounds like the drive was just taking too long for the writes to complete. Hence the (timeout). I ran it a second time, and did not get these errors. These errors may also be related to the charge degredation of the the TLC nand on these drives. This may be also partially due to the way the samsung firmware is managing sectors on the drive. In that it might be needing to restructure/rewrite metadata due to my recent firmware update.

I then went and cleaned some 30gb out of my home dir, and ran it a third time. I did not get any errors this time.

Also how are you guys "enabling trim". It is recommended that you not enable trim by adding discard to the mount options. This will greatly slow down deletes. Instead it is recommended that you let fstrim-all run out of anacron /etc/cron.weekly/fstrim. Your above trim tests will show that trim is not enabled, when it is actually being run weekly in the background. If you need trim run more frequently than that move it to the daily or hourly folder. Just be careful with doing so.