none
How Windows 8 determines whether SATA device supports TRIM? (error ERROR_FILE_LEVEL_TRIM_NOT_SUPPORTED) RRS feed

  • Question


  • I wrote some code that uses FSCTL_FILE_LEVEL_TRIM control to send TRIM command to a SATA drive. For some SATA drives it works, but for others it reports error ERROR_FILE_LEVEL_TRIM_NOT_SUPPORTED.

    I checked the IDENTIFY data of all drives and all of them have DATA SET MANAGEMENT bit set.  My question is: what other data is Windows using to see whether TRIM is supported or not? Thank you

    Tuesday, October 29, 2013 9:42 PM

Answers

  • Hi,

    File level Trim is a different type of trim request comparing to block level trim, and the supportive information depends on other information besides DATA SET MANAGEMENT - Trim bit.

    Besides of Trim support, the device also needs to support DRAT (Deterministic Read After Trim) and RZAT (Read Zero After Trim) so that Windows considers it's File Level Trim supported. You can find definitions of these fields from IDENTIFY DEVICE DATA.

    Regards,

    Michael Xing [MSFT]

    Wednesday, October 30, 2013 5:11 PM

All replies

  • Thank you for your reply. However it's not my case. I have 2 different SSDs connected to the same system. One TRIMs, another doesn't. Both SSDs do support TRIM according to IDENTIFY data. What else Windows might check? Thank you
    Wednesday, October 30, 2013 4:36 PM
  • Hi,

    File level Trim is a different type of trim request comparing to block level trim, and the supportive information depends on other information besides DATA SET MANAGEMENT - Trim bit.

    Besides of Trim support, the device also needs to support DRAT (Deterministic Read After Trim) and RZAT (Read Zero After Trim) so that Windows considers it's File Level Trim supported. You can find definitions of these fields from IDENTIFY DEVICE DATA.

    Regards,

    Michael Xing [MSFT]

    Wednesday, October 30, 2013 5:11 PM
  • Hi Michael,

    Thank you very much for your answer - indeed the failing drive does not support DRAT. 

    I'm just curious - do you know what is the reason behind requiring DRAT support? I mean why not send the TRIM command regardless? Thank you

    Wednesday, October 30, 2013 11:44 PM