Export (0) Print
Expand All

IOCTL_SCSI_MINIPORT_DSM control code

A Data Set Management (DSM) notification is transferred to a miniport driver in a IOCTL_SCSI_MINIPORT_DSM control code request. The IOCTL_SCSI_MINIPORT_DSM request is a sub-IOCTL of IOCTL_SCSI_MINIPORT. This IOCTL generated by StorPort in response to a DSM action, then sent to the miniport as a STORAGE_REQUEST_BLOCK (SRB) with a function type of SRB_FUNCTION_IO_CONTROL. The input and output data is contained in the SRB data block.

Input Parameters

The buffer specified in the DataBuffer member of the SRB must contain an SRB_IO_CONTROL structure and a DSM_NOTIFICATION_REQUEST_BLOCK structure. DataTransferLength indicates the size, in bytes, of the buffer, which must be at least sizeof (SRB_IO_CONTROL) + sizeof(DSM_NOTIFICATION_REQUEST_BLOCK), with additional storage for the MP_DEVICE_DATA_SET_RANGE structures included.

Output Parameters

An updated SRB_IO_CONTROL structure is returned to the data buffer in the SRB. The SrbStatus contains the result of the miniport's processing of the request.

Return Codes

The resulting status of the function request is set in the SrbStatus member of SRB_IO_CONTROL. The following are the DSM disk IOCTL status codes.

SRB StatusDescription
SRB_STATUS_SUCCESSThe request completed successfully.
SRB_STATUS_INVALID_REQUESTThe request contains an invalid buffer size

 

Remarks

DSM_NOTIFICATION_REQUEST_BLOCK

A DSM_NOTIFICATION_REQUEST_BLOCK structure immediately follows the SRB_IO_CONTROL structure in the data buffer of the SRB. DSM_NOTIFICATION_REQUEST_BLOCK is defined in ntddscsi.h as the following.


typedef struct _DSM_NOTIFICATION_REQUEST_BLOCK {
    ULONG   Version;
    ULONG   Size;
    ULONG   NotifyFLags;
    ULONG   DataSetProfile;
    ULONG   Reserved[3];
    ULONG   DataSetRangesCount;
    MP_DEVICE_DATA_SET_RANGE DataSetRanges[ANYSIZE_ARRAY];
} DSM_NOTIFICATION_REQUEST_BLOCK, *PDSM_NOTIFICATION_REQUEST_BLOCK;

Version

The version of the structure. Set to MINIPORT_DSM_NOTIFICATION_VERSION.

Size

The size of the structure. Set to sizeof(DSM_NOTIFICATION_REQUEST_BLOCK).

NotifyFlags

The hybrid disk request function. The function code is one of the following.

DEVICE_DSM_NOTIFY_FLAG_BEGIN

The included LBA range is used as is part of the file defined by the profile type.

DEVICE_DSM_NOTIFY_FLAG_END

The included LBA range is not used as is part of the file defined by the profile type.

Reserved[3]

Reserved. Set to 0.

DataSetRangesCount

The count of MP_DEVICE_DATA_SET_RANGE structures in DataSetRanges.

DataSetRanges

An array of MP_DEVICE_DATA_SET_RANGE structures containing LBA ranges for the profile.

MP_DEVICE_DATA_SET_RANGE

The LBA ranges are included in the in DataSetRanges member of DSM_NOTIFICATION_REQUEST_BLOCK as an array of MP_DEVICE_DATA_SET_RANGE structures. MP_DEVICE_DATA_SET_RANGE is defined in ntddscsi.h as the following.


rypedef struct _MP_DEVICE_DATA_SET_RANGE {
    LONGLONG    StartingOffset;
    ULONGLONG   LengthInBytes;
} MP_DEVICE_DATA_SET_RANGE, *PMP_DEVICE_DATA_SET_RANGE;

StartingOffset

The starting offset, in bytes, of the data set range. The offset value must be block aligned.

LengthInBytes

The length, in bytes, of the data set range. The length value must be block aligned.

The DSM_NOTIFICATION_REQUEST_BLOCK structure is located after the SRB_IO_CONTROL structure in the DataBuffer of the SRB.

The SRB_IO_CONTROL structure for this IOCTL contains IOCTL_MINIPORT_SIGNATURE_DSM_NOTIFICATION in its Signature member and IOCTL_SCSI_MINIPORT_DSM in the ControlCode member.

Requirements

Version

Available starting with Windows 8.1.

Header

Ntddscsi.h (include Ntddscsi.h)

See also

IOCTL_SCSI_MINIPORT
SRB_IO_CONTROL
STORAGE_REQUEST_BLOCK

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft