Can someone please elaborate on what is the correct way of keeping Srb pending for later completion? Is there anything wrong with my sequence of operations?
Thanks all for the help. I will try calling IoBuildAsynchronousFsdRequest() from the Work Item scheduled from StartIo. I hope this approach is fine, kindly let me know if otherwise.
Will try Driver Verified and SDV if that doesn’t solve the issue.
Tip: don’t try it later, turn driver verifier on FIRST. And leave it on during your development. Let it check everything except for low resource checking which should be done at a later time. You’d have to be crazy to develop a driver without verifier’s powerful error checking enabled. It is free and squashes bugs earlier to save development time and shorten the schedule.
I could get IOs working fine on my virtual disk after moving IoBuildAsynchronousFsdRequest() out of StartIO.
My current approach is as bellow -
Running dedicated kernel thread for IO submission
In StartIO, Srb is added to the list and event is signaled to awake the thread, if sleeping.
On event, kernel thread picks up all Srbs (one by one) from the list and sends it to another driver using IoBuildAsynchronousFsdRequest() and IoCallDriver().
Can someone please let me know whether this approach is correct from performance perspective? I am seeing very poor performance for the driver (though I am not sure storport is the bottleneck).
Also, it will be great if someone could direct on what configuration parameters should be double-checked to avoid any performance issues in virtual storport driver.