CcScheduleReadAheadEx function (ntifs.h)

The CcScheduleReadAheadEx routine performs read-ahead (also called "lazy read") on a cached file. The I/O byte count for the operation is charged to the issuing thread.

Syntax

void CcScheduleReadAheadEx(
  [in] PFILE_OBJECT   FileObject,
  [in] PLARGE_INTEGER FileOffset,
  [in] ULONG          Length,
  [in] PETHREAD       IoIssuerThread
);

Parameters

[in] FileObject

Pointer to a file object for the file on which read-ahead is to be performed.

[in] FileOffset

Pointer to a variable that specifies the starting byte offset within the cached file where the last read occurred.

[in] Length

Length in bytes of the range that was last read.

[in] IoIssuerThread

The thread issuing the read ahead request. For a file system with disk I/O accounting enabled, this is the thread the I/O is charged to. If IoIssuerThread is NULL, the I/O is charged to the current thread.

Return value

None

Remarks

CcScheduleReadAheadEx should be called only when Length >= 256. Measurements have shown that calling CcScheduleReadAheadEx for smaller reads actually decreases performance.

CcScheduleReadAheadEx can only be called after a successful call to CcCopyRead, CcCopyReadEx, CcFastCopyRead, or CcMdlRead.

Requirements

Requirement Value
Minimum supported client Windows 8
Target Platform Universal
Header ntifs.h (include Ntifs.h, FltKernel.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= APC_LEVEL

See also

CcCopyRead

CcCopyReadEx

CcFastCopyRead

CcMdlRead.

CcReadAhead

CcSetAdditionalCacheAttributes

CcSetReadAheadGranularity