IOCTL_SCSI_MINIPORT_DSM IOCTL (scsi.h)
Una notifica DSM (Data Set Management) viene trasferita a un driver miniport in una richiesta di codice di controllo IOCTL_SCSI_MINIPORT_DSM. La richiesta IOCTL_SCSI_MINIPORT_DSM è un IOCTL secondario di IOCTL_SCSI_MINIPORT. Questo IOCTL generato da StorPort in risposta a un'azione DSM, quindi inviato al miniport come STORAGE_REQUEST_BLOCK (SRB) con un tipo di funzione di SRB_FUNCTION_IO_CONTROL. I dati di input e output sono contenuti nel blocco di dati SRB.
Codice principale
Buffer di input
Il buffer specificato nel membro databuffer di del SRB deve contenere una struttura SRB_IO_CONTROL e una struttura DSM_NOTIFICATION_REQUEST_BLOCK.
Lunghezza del buffer di input
dataTransferLength indica le dimensioni, in byte, del buffer, che devono essere almeno dimensioni di (SRB_IO_CONTROL) + sizeof(DSM_NOTIFICATION_REQUEST_BLOCK), con spazio di archiviazione aggiuntivo per le strutture MP_DEVICE_DATA_SET_RANGE incluse.
Buffer di output
Una struttura di SRB_IO_CONTROL aggiornata viene restituita al buffer dei dati in SRB. Il SrbStatus contiene il risultato dell'elaborazione del miniport della richiesta.
Lunghezza del buffer di output
Lunghezza di una struttura SRB_IO_CONTROL.
Blocco di stato
Lo stato risultante della richiesta di funzione viene impostato nel membro di SrbStatus di SRB_IO_CONTROL. Di seguito sono riportati i codici di stato IOCTL del disco DSM.
Stato SRB | Descrizione |
---|---|
SRB_STATUS_SUCCESS | La richiesta è stata completata correttamente. |
SRB_STATUS_INVALID_REQUEST | La richiesta contiene dimensioni del buffer non valide |
Osservazioni
DSM_NOTIFICATION_REQUEST_BLOCK
Una struttura DSM_NOTIFICATION_REQUEST_BLOCK segue immediatamente la struttura SRB_IO_CONTROL nel buffer dei dati di SRB. DSM_NOTIFICATION_REQUEST_BLOCK è definito in ntddscsi.h come indicato di seguito.
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
Gli intervalli LBA sono inclusi in in DataSetRanges membro di DSM_NOTIFICATION_REQUEST_BLOCK come matrice di strutture MP_DEVICE_DATA_SET_RANGE. MP_DEVICE_DATA_SET_RANGE è definito in ntddscsi.h come indicato di seguito.
typedef struct _MP_DEVICE_DATA_SET_RANGE {
LONGLONG StartingOffset;
ULONGLONG LengthInBytes;
} MP_DEVICE_DATA_SET_RANGE, *PMP_DEVICE_DATA_SET_RANGE;
La struttura DSM_NOTIFICATION_REQUEST_BLOCK si trova dopo la struttura SRB_IO_CONTROL nella databuffer di SRB.
La struttura SRB_IO_CONTROL per questo oggetto IOCTL contiene IOCTL_MINIPORT_SIGNATURE_DSM_NOTIFICATION nel relativo membro Signature e IOCTL_SCSI_MINIPORT_DSM nel membro ControlCode.
Fabbisogno
Requisito | Valore |
---|---|
client minimo supportato | Disponibile a partire da Windows 8.1. |
intestazione | scsi.h (include Ntddscsi.h, Storport.h) |