Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results


Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging

The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.

Check out The OSR Learning Library at:

How PrivateCacheMap of FILE_OBJECT looks like?

yu_shangyu_shang Member Posts: 33
edited June 24 in NTFSD

Hi dear all,
I'm not sure how to setup PrivateCacheMap member of _FILE_OBJECT. Does it has any system implied requirements on it ? I mean something like that FCB must be started with a FSRTL_ADVANCED_FCB_HEADER. Many thanks!


  • rod_widdowsonrod_widdowson Member - All Emails Posts: 1,224

    You set up SectionObjectPointers (along with FsContext, FsContext2) and you call CcInitalizeCacheMap at the appropriate time. Cc worries about all the rest.

    The FAT example shows how to do all this

  • yu_shangyu_shang Member Posts: 33

    thank you. I'll try it. This doc confused me which states that this field is setup by FSD.

  • Jason_T.Jason_T. Member Posts: 94

    @yu_shang said:
    thank you. I'll try it. This doc confused me which states that this field is setup by FSD.

    You didn't specify what type of driver you have, but the file system does own the FsContext, FsContext2, SOP, etc. If you have a normal filter (i.e. not a layered file system in a filter) then you shouldn't be setting these fields. As Rod pointed out, FAT does this, but of course it is a file system.

  • yu_shangyu_shang Member Posts: 33
    edited June 25

    You didn't specify what type of driver you have

    If in the context of FSD, does this mean FSD must set PrivateCacheMap up ? how ?
    BTW I've reviewed the fastfat example , found no where it will setup PrivateCacheMap.

  • Scott_Noone_(OSR)Scott_Noone_(OSR) Administrator Posts: 3,482
    CcInitializeCacheMap set that field.


  • yu_shangyu_shang Member Posts: 33
    edited June 29

    @Scott_Noone_(OSR) said:
    CcInitializeCacheMap set that field.

    Thank you. To be a proficient driver developer. I have to debug a lot. It's really boring :smiley: .

  • Scott_Noone_(OSR)Scott_Noone_(OSR) Administrator Posts: 3,482

    A Windows file system is a significant undertaking (years not months). Patience is key and assume that anything you write in the first 6-9 months will probably be just a learning exercise. Good luck!


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Writing WDF Drivers 12 September 2022 Live, Online
Internals & Software Drivers 23 October 2022 Live, Online
Kernel Debugging 14 November 2022 Live, Online
Developing Minifilters 5 December 2022 Live, Online