TRIM/UNMAP support

What does Windows 7 require of a SCSI device to know if it supports TRIM? From a read through the spec it appears that READ_CAPACITY16 needs the TPE (thin provision) bit set, and then VPD_BLOCK_LIMITS would be queried and the flags in there would also indicate support. I implement this but windows doesn’t call READ_CAPACITY16, only READ_CAPACITY (10) which doesn’t have a TPE bit.

I assume I’m missing some other field to tell Windows that my device supports features that can only be identified through READ_CAPACITY16… what am I missing?

FYI, this is for Xen PV drivers to pass the TRIM/UNMAP command through to Xen to get proper support for SSD devices.

Thanks

James

From my memory as long as “fsutil behavior query DisableDeleteNotify” is set to “0”, system always sends TRIM command (IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES) but if the port driver fails it with not_supported status (IIRC), then it is not sent again in the same session.

Also I don’t think windows (at least on 7) there is any native support for UNMAP command. You have to do the translation yourself (TRIM -> UNMAP)

>I assume I’m missing some other field to tell Windows that my device supports features that can >only be identified through READ_CAPACITY16… what am I missing?
On Windows 7 only available IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES which enables TRIM support. You can’t use SCSI command to enable this support.
I heard that T10 Technical Committee works to add TRIP support to SCSI commands. Does it already implement in READ_CAPACITY16?
I don’t know what is a situation with SCSI TRIM command in Windows8/Win2012.

Igor Sharovar