none
Help for writing a disk cache filter driver. RRS feed

  • Question

  • I have completely understood how kmdf toaster sample driver works. I need to start writing a disk cache filter driver using KMDF. I tried a lot to find some useful references but could not find much. So thought of writing it here I might get some help??
    Tuesday, August 6, 2013 1:07 PM

Answers

  • Basically, you are going to be creating a disk filter above the disk.sys driver (unless you mean a volume filter which is a different animal).   The good news is that the disk driver sources are shipped in the WDK samples so you can understand requests are being passed to you. 

    Basically, you are going to need to handle read, write and IOCTL calls to support a disk cache.  There is no API's to supprt caching, and you need to plan your driver for the fact that you may recieve requests at DISPATCH_LEVEL which greatly limits the API's you can use.

    Note: that Windows does an agressive job of file caching, so the couple of times I have tested commercial disk caches they actually lowered performance.   There are other reasons for such a driver, so this is not to say don't do it. 


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

    Tuesday, August 6, 2013 1:16 PM

All replies

  • Basically, you are going to be creating a disk filter above the disk.sys driver (unless you mean a volume filter which is a different animal).   The good news is that the disk driver sources are shipped in the WDK samples so you can understand requests are being passed to you. 

    Basically, you are going to need to handle read, write and IOCTL calls to support a disk cache.  There is no API's to supprt caching, and you need to plan your driver for the fact that you may recieve requests at DISPATCH_LEVEL which greatly limits the API's you can use.

    Note: that Windows does an agressive job of file caching, so the couple of times I have tested commercial disk caches they actually lowered performance.   There are other reasons for such a driver, so this is not to say don't do it. 


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

    Tuesday, August 6, 2013 1:16 PM
  • Thanks.
    Tuesday, August 6, 2013 1:56 PM