1

I'm developing a virtual disk driver for Windows that is using an ordinary file as a storage (much like VHD virtual disk driver that comes with Windows 7).

My virtual driver supports writing and has a cache that I need to flush when OS shuts down. Obvious solution is to handle SRB_FUNCTION_SHUTDOWN/SRB_FUNCTION_FLUSH SCSI requests.

However what if the real disk (that my file resides on), receives the shutdown request before my virtual driver? Apparently it will not accept any more write requests and I won't be able to flush the data.

Any solution to this problem? Thank you

Isso
  • 1,285
  • 11
  • 23
  • Establish a filter on top of the real disk that looks for the shutdown call. When the filter receives it, it calls your driver (it's just part of your driver) to flush. When the flush completes, the filter lets the shutdown proceed. – MJZ Aug 04 '13 at 22:12

0 Answers0