The generic storage class driver (classpnp.sys) exposes an I/O control (IOCTL) interface for issuing Persistent Reserve In commands. The behavior of the storage device when a Persistent Reserve In command is received is described in the SCSI Primary Commands - 2 (SPC-2) specification. The IOCTL interface requires the caller to have read access to the physical device for Persistent Reserve In commands. User-mode applications, services, and kernel-mode drivers can use this IOCTL to control persistent reservations. If called from a driver, this IOCTL must be called from a thread running at IRQL < DISPATCH_LEVEL. This IOCTL is defined with FILE_READ_ACCESS, requiring a device handle to have read permissions to issue the Persistent Reserve In command.
The buffer at Irp->AssociatedIrp.SystemBuffer contains a PERSISTENT_RESERVE_COMMAND structure. You must allocate the buffer from nonpaged pool and must align it correctly for the target device and adapter.
PR_IN.ServiceAction can be one of the following:
Input Buffer Length
The length of .
For PR_IN.ServiceAction = RESERVATION_ACTION_READ_KEYS, the output buffer contains a PRI_REGISTRATION_LIST structure and must be at least sizeof(PRI_REGISTRATION_LIST).
For PR_IN.ServiceAction = RESERVATION_ACTION_READ_RESERVATIONS, the output buffer contains a PRI_RESERVATION_LIST structure and must be at least sizeof(PRI_RESERVATION_LIST).
If the allocated buffer is too small to return all the Persistent Reserve In data, success will be returned and the required size will be returned in the parameter list AdditionalLength field.
Output Buffer Length
The length of .
Input / Output Buffer
Input / Output Buffer Length
The Information field is set to the size of the output buffer. For ServiceAction = RESERVATION_ACTION_READ_KEYS, the output buffer is a PRI_REGISTRATION_LIST structure. For ServiceAction = RESERVATION_ACTION_READ_RESERVATIONS, the output buffer is a PRI_RESERVATION_LIST structure.
The Status field is set to one of the following:
|Header||ntddstor.h (include Ntddstor.h)|