title: Handle system shutdown in virtual disk driver
body: <p>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). </p>
  
  <p>My virtual driver supports writing and has a cache that I need to flush when OS shuts down. Obvious solution is to handle <code>SRB_FUNCTION_SHUTDOWN/SRB_FUNCTION_FLUSH</code> SCSI requests.</p>
  
  <p>However what if the <strong>real</strong> disk (that my file resides on), receives the shutdown request <strong>before</strong> my virtual driver? Apparently it will not accept any more write requests and I won't be able to flush the data.</p>
  
  <p>Any solution to this problem? Thank you</p>