Queuing Storage Requests

Although it is possible for a storage class driver to set up internal queues for IRPs, it is seldom necessary to do so and likely to degrade the driver's performance as well, because the storage port driver already maintains driver-created, LU-specific device queues for IRPs. Whether or not a particular HBA supports multiple outstanding commands (for example, SCSI tagged queuing), storage class drivers can send every request to their devices as each IRP comes in and rely on the system-supplied port driver or the HBA to handle queued requests expeditiously.

When certain SCSI errors occur, the system port driver freezes the appropriate LU-specific queue and notifies the class driver. For more information about handling errors and releasing frozen request queues, see the following:

Storage Class Driver's ReleaseQueue Routine

Storage Class Driver's InterpretRequestSense Routine

Storage Class Driver's RetryRequest Routine

If an HBA supports command queuing, as indicated in the returned STORAGE_ADAPTER_DESCRIPTOR data, the class driver sets SRB_FLAGS_QUEUE_ENABLE and uses the QueueAction member of the SRBs it creates to control how its requests are queued.