Questions about the Cache..

Hi. all.
I have some problems with cache manager.

  1. Can i control the cache manager operations - like as Read-Ahead and Lazy-Write in my filter driver ? (intercept thats)
  2. How can i re-set a file size in my filter driver ?

please give a smart point to me.

Thanks in advance.
park.

CcSetAditionalCacheAttributes can be used to control whatever read ahead or lazy write will be peformed on a file stream.

Intercpeting lazy writes: they are nothing more than synchronous paging write IO , so if you trap paging IO , you implicitly trap them.

Intercepting read ahead: same – this is paging IO read.

File systems use CcSetFileSizes to comunicate size changes to cache manager. This API will ensure that the section is updated corectly.