DEVICE_DSM_ACTION Descriptions

This page describes the DEVICE_DSM_ACTION constants that can be used to perform a data set management (DSM) action on a device's data set. These constants are defined in ntddstor.h. Actions identified as nondestructive will not alter any data. See Data Set Management Overview for information on how a DSM action is processed.

DEVICE_DSM_ACTION Constant Description
DeviceDsmAction_None For structure initialization purposes only.
DeviceDsmAction_Trim The driver will perform a trim operation.
DeviceDsmAction_Notification NonDestructive. The driver will perform a notification operation. For this action, the parameter block immediately following the DEVICE_DSM_INPUT structure is formatted as a DEVICE_DSM_NOTIFICATION_PARAMETERS structure. Supported in Windows 7 and later versions.
DeviceDsmAction_OffloadRead NonDestructive. The driver performs an offload read operation. For this action, the parameter block immediately following the DEVICE_DSM_INPUT structure is formatted as a DEVICE_DSM_OFFLOAD_READ_PARAMETERS structure. The output consists of a DEVICE_DSM_OUTPUT structure, followed by a STORAGE_OFFLOAD_READ_OUTPUT structure. Supported in Windows 8 and later versions.
DeviceDsmAction_OffloadWrite The driver will perform an offload write operation. For this action, the parameter block immediately following the DEVICE_DSM_INPUT structure is formatted as a DEVICE_DSM_OFFLOAD_WRITE_PARAMETERS structure. The output consists of a DEVICE_DSM_OUTPUT structure, followed by a STORAGE_OFFLOAD_WRITE_OUTPUT structure. Supported in Windows 8 and later versions.
DeviceDsmAction_Allocation NonDestructive. The driver will perform a logical block provisioning operation. The logical block range is specified in a single DEVICE_DSM_RANGE structure. Supported in Windows 8 and later versions.
DeviceDsmAction_Repair NonDestructive. For internal use only.
DeviceDsmAction_Scrub NonDestructive. For internal use only.
DeviceDsmAction_DrtQuery NonDestructive. For internal use only.
DeviceDsmAction_DrtClear NonDestructive. For internal use only.
DeviceDsmAction_DrtDisable NonDestructive. For internal use only.
DeviceDsmAction_TieringQuery NonDestructive. For internal use only.
DeviceDsmAction_Map NonDestructive. For internal use only.
DeviceDsmAction_RegenerateParity NonDestructive. For internal use only.
DeviceDsmAction_NvCache_Change_Priority NonDestructive. The driver will change the caching priority of specified ranges of logical blocks. The new target priority is set in a DEVICE_DSM_NVCACHE_CHANGE_PRIORITY_PARAMETERS structure which is located in the parameter block immediately following the DEVICE_DSM_INPUT structure. The logical block ranges for which to change priority are given in one or more DEVICE_DSM_RANGE structures. Supported in Windows 8.1 and later versions.
DeviceDsmAction_NvCache_Evict NonDestructive. The driver will evict data from the caching medium. To evict all data, set the DEVICE_DSM_FLAG_ENTIRE_DATA_SET_RANGE flag in the Flags member of DEVICE_DSM_INPUT and do not include any DEVICE_DSM_RANGE structures. Specific logical block ranges to evict are given in one or more DEVICE_DSM_RANGE structures. The DeviceDsmAction_NvCache_Evict action is executed synchronously. No other actions are serviced until the evict action has either succeeded or failed. In order to limit its impact on applications using the device, each DeviceDsmAction_NvCache_Evict action issued should include relatively small data ranges. They should not exceed 10 MB and ideally be smaller than 2 MB. This will minimize the chance that user level applications will experience noticeable delays when accessing data on the device. Supported in Windows 8.1 and later versions.
DeviceDsmAction_TopologyIdQuery NonDestructive. For internal use only.
DeviceDsmAction_GetPhysicalAddresses NonDestructive. The driver will return the physical address ranges that correspond to one or more logical block ranges. This action is only supported on persistent memory disks. The logical block ranges are specified as a series of DEVICE_DSM_RANGE structures immediately following the DEVICE_DSM_INPUT structure. The output consists of a DEVICE_DSM_OUTPUT structure, followed by padding and then a DEVICE_DSM_PHYSICAL_ADDRESSES_OUTPUT structure with the physical address ranges requested in the output block. Each physical address range is returned in a DEVICE_STORAGE_ADDRESS_RANGE structure. If the output buffer isn’t large enough to hold all the data, the DSM returns STATUS_BUFFER_OVERFLOW and the TotalNumberOfRanges field of the DEVICE_DSM_PHYSICAL_ADDRESSES_OUTPUT structure contains the number of DEVICE_STORAGE_ADDRESS_RANGE elements needed to satisfy the request. Any physical address ranges that contain a memory error will have DEVICE_DSM_PHYSICAL_ADDRESS_HAS_MEMORY_ERROR as its address. Applications can map the returned physical address ranges to the input logical block ranges by keeping track of the length of each returned physical address range. Note that a single logical block range can correspond to many physical address ranges. If DEVICE_DSM_FLAG_PHYSICAL_ADDRESSES_OMIT_TOTAL_RANGES is set in the Flags field of the DEVICE_DSM_INPUT structure, then the driver will not compute TotalNumberOfRanges. This is a performance optimization for callers that don’t need to know the total number of ranges.
DeviceDsmAction_ScopeRegen NonDestructive. For internal use only.
DeviceDsmAction_ReportZones NonDestructive. For internal use only.
DeviceDsmAction_OpenZone NonDestructive. For internal use only.
DeviceDsmAction_FinishZone NonDestructive. For internal use only.
DeviceDsmAction_CloseZone NonDestructive. For internal use only.
DeviceDsmAction_ResetWritePointer For internal use only.
DeviceDsmAction_GetRangeErrorInfo NonDestructive. The driver will return information about whether one or more logical block ranges contain any media errors. This is only supported on persistent memory disks. The logical block ranges are specified as a series of DEVICE_DSM_RANGE structures immediately following the DEVICE_DSM_INPUT structure. The output consists of a DEVICE_DSM_OUTPUT structure, followed by padding and by a DEVICE_DSM_RANGE_ERROR_OUTPUT) structure which holds an array of DEVICE_STORAGE_RANGE_ATTRIBUTES. If the output buffer isn’t large enough to hold all the data, the DSM returns STATUS_BUFFER_OVERFLOW and the TotalNumberOfRanges field of the DEVICE_DSM_RANGE_ERROR_OUTPUT structure contains the number of DEVICE_STORAGE_RANGE_ATTRIBUTES elements needed to satisfy the request. Each DEVICE_STORAGE_RANGE_ATTRIBUTES structure contains an IsRangeBad field. The driver sets that field to 1 when the logical block range contains a media error. If there are no media errors in any of the requested ranges, the driver sets DEVICE_STORAGE_NO_ERRORS in the Flags field of DEVICE_DSM_RANGE_ERROR_OUTPUT. The elements of the DEVICE_STORAGE_RANGE_ATTRIBUTES array are sorted so that their order corresponds to the order of the input ranges. For example, if the first input range was broken into 3 output ranges, those will be the first 3 ranges in the array. The caller can learn which output ranges correspond to an input range by keeping track of the length of the output ranges.
DeviceDsmAction_WriteZeroes For internal use only.
DeviceDsmAction_LostQuery NonDestructive. For internal use only.
DeviceDsmAction_GetFreeSpace NonDestructive. For internal use only.
DeviceDsmAction_ConversionQuery NonDestructive. For internal use only.