CcSetDirtyPageThreshold function (ntifs.h)

The CcSetDirtyPageThreshold routine sets a per-file dirty page threshold on a cached file.

Syntax

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

Parameters

[in] FileObject

Pointer to a file object for the cached file on which the dirty page threshold is to be set.

[in] DirtyPageThreshold

Specifies, as a number of pages, the dirty page threshold value. To remove a per-file dirty page threshold value that was set previously, set DirtyPageThreshold to zero.

Return value

None

Remarks

CcSetDirtyPageThreshold sets or removes a per-file dirty page threshold. After a per-file dirty page threshold is set on a cached file, if the file system attempts to exceed the threshold, the cache manager will refuse requests to write to the file.

To determine whether the cache manager will accept or refuse write requests, use CcCanIWrite.

Note that the per-file dirty page threshold is not the same as the global dirty page threshold for the entire system cache.

Requirements

Requirement Value
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe

See also

CcCanIWrite

CcDeferWrite