none
Handling IRP_MJ_SHUTDOWN RRS feed

  • Question

  • Hi,

    I am working on an upper volume filter driver using diskperf as base.
    I am handling "IRP_MJ_SHUTDOWN" IRP, so while shutting down the system I want to save a buffer of size ranging from 30Mb to 500Mb.
    So can I write this buffer to a file and when the system reboots again our driver should read the buffer from that file, so is this possible?
    If yes, then can anyone guide me which functions to use for it?

    Awaiting a positive response.

    Thanks in advance.
    Saturday, March 8, 2014 6:50 AM

Answers

  • You should be able to hold the IRP_MJ_SHUTDOWN long enough to send your requests to the volume.  You cannot do this as file system calls, so you will need to know the address range where you are going to write this by shutdown.  This is part of the purpose of IRP_MJ_SHUTDOWN, i.e. to flush internal buffers.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Monday, March 10, 2014 6:13 PM

All replies

  • You should be able to hold the IRP_MJ_SHUTDOWN long enough to send your requests to the volume.  You cannot do this as file system calls, so you will need to know the address range where you are going to write this by shutdown.  This is part of the purpose of IRP_MJ_SHUTDOWN, i.e. to flush internal buffers.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Monday, March 10, 2014 6:13 PM
  • Hi,

    Thanks for the reply.

    >You should be able to hold the IRP_MJ_SHUTDOWN long enough to send your requests to the volume.

    What does you mean by "Holding the IRP_MJ_SHUTDOWN long enough"?

    Also can you please tell me which functions can be used to save this buffer in a file/write it to an offset OR read it from a file/read it from an offset, whichever is possible?

    Awaiting a positive response.

    Wednesday, March 12, 2014 1:04 PM