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