IOCTL_SCSI_MINIPORT_DSM - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// scsi.h

// CTL_CODE(0x001b, 0x1c8, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_SCSI_MINIPORT_DSM 0x001B0720
View the official Windows Driver Kit DDI reference
// storport.h

// CTL_CODE(0x001b, 0x1c8, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_SCSI_MINIPORT_DSM 0x001B0720
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ni-scsi-ioctl_scsi_miniport_dsm)

IOCTL_SCSI_MINIPORT_DSM IOCTL (scsi.h)

Description

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.

Note The SCSI port driver and SCSI miniport driver models may be altered or unavailable in the future. Instead, we recommend using the Storport driver and Storport miniport driver models.

Parameters

Major code

Input buffer

The buffer specified in the DataBuffer member of the SRB must contain an SRB_IO_CONTROL structure and a DSM_NOTIFICATION_REQUEST_BLOCK structure.

Input buffer length

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 buffer

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.

Output buffer length

The length of an SRB_IO_CONTROL structure.

Input/output buffer

Input/output buffer length

Status block

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 Status Description
SRB_STATUS_SUCCESS The request completed successfully.
SRB_STATUS_INVALID_REQUEST The 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;

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.

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

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.

See also

IOCTL_SCSI_MINIPORT

SRB_IO_CONTROL

STORAGE_REQUEST_BLOCK


Windows Driver Kit DDI reference (ni-storport-ioctl_scsi_miniport_dsm)

IOCTL_SCSI_MINIPORT_DSM IOCTL (storport.h)

Description

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.

Note The SCSI port driver and SCSI miniport driver models may be altered or unavailable in the future. Instead, we recommend using the Storport driver and Storport miniport driver models.

Parameters

Major code

Input buffer

The buffer specified in the DataBuffer member of the SRB must contain an SRB_IO_CONTROL structure and a DSM_NOTIFICATION_REQUEST_BLOCK structure.

Input buffer length

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 buffer

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.

Output buffer length

The length of an SRB_IO_CONTROL structure.

Input/output buffer

Input/output buffer length

Status block

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 Status Description
SRB_STATUS_SUCCESS The request completed successfully.
SRB_STATUS_INVALID_REQUEST The 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;

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.

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

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.

See also

IOCTL_SCSI_MINIPORT

SRB_IO_CONTROL

STORAGE_REQUEST_BLOCK