I seek working driver code for Windows NT/W2K that provides the list
of blocks written to the SCSI drives of the server, similar to the
Diskmon utility from SysInternals.com. The GUI is not important, but
my user level code needs to know every block written to, whether done
by an application or initiated by the file system code itself.
Also, the driver should support dynamic loading via the Service
Control API.
That is, no reboot should be required. I've done this part myself,
using DDK examples. Filemon has similar source:
http://www.sysinternals.com/ntw2k/source/filemon.shtml
Diskmon does all these things, but doesn't come with source. Check it
out at http://www.sysinternals.com/ntw2k/freeware/diskmon.shtml. To
the extent possible, the driver should be a nice driver citizen. It
would be very nice if, in addition to delivering the set of <drive,
block address> changes between calls to DeviceIoControl, that you
mentioned how to possibly throttle or delay the acknowledgement or
successful completion of a write from the user level code.
This question is more complex than average, I know. I would be happy
to provide clarifications or (possibly) entertain alternate
approaches. I should note that I am not a driver writer, but I am a
reasonable NT programmer. My goal is to compare the blocks seen by my
Fibre Channel analysis probe to the blocks being written by NT. |