Virtual disk hang

Hi,

I wrote a bus enumerator that creates virtual disks based on Primoz Beltram’s virtual disk code http://www.pudn.com/downloads94/sourcecode/windows/vxd/detail369876.html

The code works and I am able to mount the disk & do small read or write operations to the disk. However, with large reads or writes, the disk hangs, and I am not able to figure out how to debug my driver.

I did looks for the obvious deadlocks, but I am not using any locks in my driver code.

Any pointers on how to debug my driver?

Regards,
Mridul.

Well, I’d probably start by using WinDbg and IrpTracker.

Where in the stack does your driver live (you don’t really expect me to download and look at some random code from some random web site, do you)??

What’s happening on the large reads/writes versus the small ones? Do they both get to your driver?

You’re not giving us much to go on here,

Peter
OSR

> and I am not able to figure out how to debug my driver.

Windbg is the best tool for windows driver debug I think. But windbg
need two machine, one is host and the other is target. If you cannot get
two physical machine now, you can have a try to use virtual machine
solution.

I did looks for the obvious deadlocks, but I am not using any locks in my driver code.

First of all, you should confirm which course your driver ‘deadlocks’.
Large I/O request or lots of request block you driver. AFAIK, something
if one I/O request cannot precessed properly by your driver, such as
cannot give properly data or not return error, file system may wait for
that I/O request for a long time or hang your windows.

Thanks
Wayne