Regarding IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES

I am intercepting IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES in volume filter.

I performed following steps

1 I have 2 hard disks connected to the system with TRIM support not available, each having a volume.
2 I have enabled trim using fsutil behavior set disabledeletenotify 0
3 I have deleted files on both the volumes.
4 I could see IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES getting called from NtfsFreeRecentlyDeallocated and observed that this is successful from completion path for both volumes.

There was a difference in call stack for both volumes

  • Completion for 2nd disk got called from ataport!DeviceStorageManageDataSetAttributes
  • Completion for 1st disk got called from volmgr!VmpManageDataSetAttributes

Considering this, if there is no support for TRIM

  • Does the IOCTL return with SUCCESS from port driver ?
  • Does the IOCTL return with SUCCESS from volume manager if trim is not supported from underlying disk ?

Any help would be highly appreciated.

Can someone confirm if IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES is sent always by NTFS even underlying volume/disk does not support TRIM ?

IIRC, it is sent always at least once per session. If it fails (by port driver/disk ?) then file system does not send it any more for the given session. This is what I observed from a lower disk filter on win 7.

Thanks Pradeep.

In my case, I found the IOCTL completed successfully from underlying driver stack even the disk is not supporting TRIM command. I observed this on Windows Server 2008 R2.

I believe my observation on trim was along the lines of Pradeep. Could it
be that the some other filter in the device stack or the disk is
incorrectly reporting itself as supporting TRIM?

On Mon, May 13, 2013 at 12:15 PM, wrote:

> Thanks Pradeep.
>
> In my case, I found the IOCTL completed successfully from underlying
> driver stack even the disk is not supporting TRIM command. I observed this
> on Windows Server 2008 R2.
>
> —
> NTDEV is sponsored by OSR
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>