DEVICE_DATA_MANAGEMENT_SET_ACTION

A DEVICE_DATA_MANAGEMENT_SET_ACTION constant specifies a type of management action that is performed by the driver on the data-set attributes for a device.

The management action is specified in the DEVICE_MANAGE_DATA_SET_ATTRIBUTES structure contained in the system buffer of an IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES request.

DeviceDsmAction_None 0 For structure initialization purposes only.

DeviceDsmAction_Trim 1 The driver will perform a trim operation.

DeviceDsmAction_Notification (2 | DeviceDsmActionFlag_NonDestructive) The driver will perform a notification operation.

For this action, the ParameterBlockOffset and ParameterBlockLength members of the DEVICE_MANAGE_DATA_SET_ATTRIBUTES structure specify the parameters of the notification operation. These parameters are formatted as a DEVICE_DSM_NOTIFICATION_PARAMETERS structure.

> [!Note] > Supported in Windows 7 and later versions of Windows.

DeviceDsmAction_OffloadRead (3 | DeviceDsmActionFlag_NonDestructive) The driver performs an offload read operation.

For this action, the ParameterBlockOffset and ParameterBlockLength members of the DEVICE_MANAGE_DATA_SET_ATTRIBUTES structure specify the parameters of the offload read operation. These parameters are formatted as a DEVICE_DSM_OFFLOAD_READ_PARAMETERS structure.

> [!Note] > Supported in Windows 8 and later versions of Windows.

DeviceDsmAction_OffloadWrite 4 The driver will perform an offload write operation.

For this action, the ParameterBlockOffset and ParameterBlockLength members of the DEVICE_MANAGE_DATA_SET_ATTRIBUTES structure specify the parameters of the offload write operation. These parameters are formatted as a DEVICE_DSM_OFFLOAD_WRITE_PARAMETERS structure.

> [!Note] > Supported in Windows 8 and later versions of Windows.

DeviceDsmAction_Allocation (5 | DeviceDsmActionFlag_NonDestructive) The driver will perform a logical block provisioning operation.

The logical block range is specified in a single DEVICE_DATA_SET_RANGE structure.

> [!Note] > Supported in Windows 8 and later versions of Windows.

DeviceDsmAction_Repair (6 | DeviceDsmActionFlag_NonDestructive) The driver will perform a storage spaces repair operation.

The logical block range is specified in a single DEVICE_DATA_SET_RANGE structure. The number of repair copies is specified in a DEVICE_DATA_SET_REPAIR_PARAMETERS structure located in the input buffer as specified by the ParameterBlockOffset member of the DEVICE_MANAGE_DATA_SET_ATTRIBUTES structure.

> [!Note] > Supported in Windows 8 and later versions of Windows.

DeviceDsmAction_Scrub (7 | DeviceDsmActionFlag_NonDestructive) The driver will perform a storage spaces scrub operation.

The logical block range is specified in a single DEVICE_DATA_SET_RANGE structure.

> [!Note] > Supported in Windows 8 and later versions of Windows.

DeviceDsmAction_DrtQuery (8 | DeviceDsmActionFlag_NonDestructive) The driver will perform a query for the logical block range specified and checks if it is included in storage spaces dirty range tracking. The synchronization status of the range is returned in the OperationStatus member of the DEVICE_MANAGE_DATA_SET_ATTRIBUTES_OUTPUT structure.

The logical block range is specified, on input, in a single DEVICE_DATA_SET_RANGE structure.

> [!Note] > Supported in Windows 8 and later versions of Windows.

DeviceDsmAction_DrtClear (9 | DeviceDsmActionFlag_NonDestructive) The driver will clear dirty range status for the for the logical block range specified.

The logical block range is specified in a single DEVICE_DATA_SET_RANGE structure.

> [!Note] > Supported in Windows 8 and later versions of Windows.

DeviceDsmAction_DrtDisable (10 | DeviceDsmActionFlag_NonDestructive) The driver will disable dirty range tracking for the logical block range specified.

The logical block range is specified in a single DEVICE_DATA_SET_RANGE structure.

> [!Note] > Supported in Windows 8 and later versions of Windows.

DeviceDsmAction_NvCache_Change_Priority (14 | DeviceDsmActionFlag_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 at ParameterBlockOffset in DEVICE_MANAGE_DATA_SET_ATTRIBUTES. The logical block ranges to change priority for are given in one or more DEVICE_DATA_SET_RANGE structures.

The DEVICE_DSM_NVCACHE_CHANGE_PRIORITY_PARAMETERS is defined in ntddstor.h and has the following members:

Size
Size of this structure. Set to sizeof(DEVICE_DSM_NVCACHE_CHANGE_PRIORITY_PARAMETERS).

TargetPriority
The new target priority for the logical block ranges given.

Resrved[3]
Reserved bytes.

> [!Note] > Supported in Windows 8.1 and later versions of Windows.

DeviceDsmAction_NvCache_Evict (15 | DeviceDsmActionFlag_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_MANAGE_DATA_SET_ATTRIBUTES and do not include any DEVICE_DATA_SET_RANGE structures.

Specific logical block ranges to evict are given in one or more DEVICE_DATA_SET_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.

> [!Note] > Supported in Windows 8.1 and later versions of Windows.

Remarks

If a bitwise OR of the DEVICE_DATA_MANAGEMENT_SET_ACTION constant value and the DeviceDsmActionFlag_NonDestructive flag is performed, the specified action is nondestructive. If this flag is set, the driver can safely forward the IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES request to the next lower driver in the stack even if the driver does not handle the specified action.

> [!Note] > Before it forwards the IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES request, the driver still performs the normal processing of the block of data set ranges that are specified in the DEVICE_MANAGE_DATA_SET_ATTRIBUTES structure. This block is located at DataSetRangesOffset and consists of one or more contiguous entries formatted as DEVICE_DATA_SET_RANGE structures. The length, in bytes, of the data set ranges is set in the DataSetRangesLength member of DEVICE_MANAGE_DATA_SET_ATTRIBUTES.

Requirements

Version

Available starting with Windows 7.

Header

Ntddstor.h (include Ntddstor.h)

See also

DEVICE_DSM_NOTIFICATION_PARAMETERS

DEVICE_MANAGE_DATA_SET_ATTRIBUTES

IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES

Send comments about this topic to Microsoft