// ntifs.h
VOID CcSetAdditionalCacheAttributes(
[in] PFILE_OBJECT FileObject,
[in] BOOLEAN DisableReadAhead,
[in] BOOLEAN DisableWriteBehind
);
View the official Windows Driver Kit DDI referenceNo description available.
Call the CcSetAdditionalCacheAttributes routine to enable or disable read-ahead (also called "lazy read") or write-behind (also called "lazy write") on a cached file.
FileObject [in]Pointer to a file object for the cached file.
DisableReadAhead [in]Boolean value set to TRUE to disable read-ahead, or FALSE to enable it.
DisableWriteBehind [in]Boolean value set to TRUE to disable write-behind, or FALSE to enable it.
CcSetAdditionalCacheAttributes can be called any time after calling CcInitializeCacheMap. Initially, both read-ahead and write-behind are enabled.