ccSetDirtyPageThreshold 函数 (ntifs.h)

CcSetDirtyPageThreshold 例程对缓存文件设置每文件脏页阈值。

语法

void CcSetDirtyPageThreshold(
  [in] PFILE_OBJECT FileObject,
  [in] ULONG        DirtyPageThreshold
);

参数

[in] FileObject

指向要设置脏页阈值的缓存文件的文件对象的指针。

[in] DirtyPageThreshold

指定页数脏页阈值。 若要删除之前设置的每文件脏页阈值,请将 DirtyPageThreshold 设置为零。

返回值

备注

CcSetDirtyPageThreshold 设置或删除每个文件脏页阈值。 在缓存文件上设置每文件脏页阈值后,如果文件系统尝试超过阈值,缓存管理器将拒绝写入文件的请求。

若要确定缓存管理器是接受还是拒绝写入请求,请使用 CcCanIWrite

请注意,每个文件脏页阈值与整个系统缓存的全局脏页阈值不同。

要求

要求
目标平台 通用
标头 ntifs.h (包括 Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe

另请参阅

CcCanIWrite

CcDeferWrite