// ntddstor.h
typedef struct _DEVICE_DSM_DEFINITION {
DEVICE_DSM_ACTION Action;
BOOLEAN SingleRange;
ULONG ParameterBlockAlignment;
ULONG ParameterBlockLength;
BOOLEAN HasOutput;
ULONG OutputBlockAlignment;
ULONG OutputBlockLength;
} DEVICE_DSM_DEFINITION, *PDEVICE_DSM_DEFINITION;
View the official Windows Driver Kit DDI referenceNo description available.
The DEVICE_DSM_DEFINITION structure contains the properties for a data set management (DSM) action.
ActionDeviceDsmDefinition_*Xxx* value that specifies the action to be performed. See DEVICE_DSM_ACTION Descriptions for a list of action values and their associated definition values. These values are defined in ntddstor.h.
SingleRangeSpecifies whether the DSM action supports only a single range at a time. If the DSM action is to be performed on the entire data set range, the flag DEVICE_DSM_FLAG_ENTIRE_DATA_SET_RANGE is set.
ParameterBlockAlignmentThe alignment for the parameter block within the payload of the IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES request.
ParameterBlockLengthThe length, in bytes, of the parameter block within the payload of the IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES request. The parameter block will follow the DSM_DEVICE_INPUT structure. If ParameterBlockLength is set to zero, then the parameter block does not exist.
HasOutputSet TRUE if the action specified in the Action member will return output; otherwise, set this to FALSE.
OutputBlockAlignmentThe alignment for the output block within the payload of the IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES request.
OutputBlockLengthSpecifies the length, in bytes, of the output block within the payload of the IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES request. The output block follows the DSM_DEVICE_OUTPUT structure. If OutputBlockLength is set to zero, then the output block does not exist.
Each DSM action has a definition associated with it. For example, DeviceDsmAction_Trim has DeviceDsmDefinition_Trim as its associated definition. The DSM sender or handler allocates and initializes the DEVICE_DSM_DEFINITION structure with the appropriate definition. They then pass the pointer to this structure to all DSM-related functions that need it.
See Data Set Management Overview for information on how a DSM is processed.
DEVICE_DSM_ACTION Descriptions
IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES