IO Retry events from disk.sys

We are seeing IO retry events with our storport miniport driver for SATA. The event signature is similar to this:
“The IO operation at logical block address X for Disk Y (PDO name Z) was retried”
There are lots of such messages.

There is no associated data loss or corruption, but we wanted to understand how our driver might be influencing these messages and what we can do to avoid them.
Surprisingly we have never returned any IO with any status other than SRB_STATUS_SUCCESS during the duration of the said IO stress test, but we still see those messages in event viewer.

Any pointers on when such messages get generated and what our driver needs to do to avoid them will be appreciated, thanks.

Regards,
Suresh

To bring this thread to closure, there was an oversight and we were in fact returning STATUS_FAILURE in a particular code path to few incoming IOs when we were running out of resources under heavy load.
Returning STATUS_BUSY (and thereby letting the storport retry them) solved the issue.

Regards,
Suresh

Thank you, Mr. Patil, for coming back and letting us know the ultimate cause/solution. That’s very helpful for folks in future reading the archive.

Peter