FsRtlGetNextLargeMcbEntry routine

The FsRtlGetNextLargeMcbEntry routine retrieves a mapping run from a map control block (MCB).

Syntax


BOOLEAN FsRtlGetNextLargeMcbEntry(
  _In_  PLARGE_MCB OpaqueMcb,
  _In_  ULONG      RunIndex,
  _Out_ PLONGLONG  LargeVbn,
  _Out_ PLONGLONG  LargeLbn,
  _Out_ PLONGLONG  LargeSectorCount
);

Parameters

OpaqueMcb [in]

Pointer to an initialized MCB structure.

RunIndex [in]

Zero-based index of the requested mapping run.

LargeVbn [out]

Pointer to a variable that receives the starting virtual block number (VBN) of the mapping run, or zero if the run does not exist. Its value is meaningless if FsRtlGetNextLargeMcbEntry returns FALSE.

LargeLbn [out]

Pointer to a variable that receives the starting logical block number (LBN) of the mapping run, or zero if the run does not exist. Its value is meaningless if FsRtlGetNextLargeMcbEntry returns FALSE.

LargeSectorCount [out]

Pointer to a variable that receives the number of sectors in the mapping run, or zero if the run does not exist. Its value is meaningless if FsRtlGetNextLargeMcbEntry returns FALSE.

Return value

FsRtlGetNextLargeMcbEntry returns TRUE if the requested mapping run exists in the MCB, FALSE otherwise.

Remarks

FsRtlGetNextLargeMcbEntry retrieves the starting VBN, starting LBN, and sector count for a mapping run in an MCB.

Note   The upper 32 bits of the LBN are ignored. Only the lower 32 bits are used.
 

Holes are counted as runs.

The following code snippet shows how to print out all of the runs in a file:


for (i = 0; FsRtlGetNextLargeMcbEntry(Mcb,i,&Vbn,&Lbn,&Count); i++) {

    // print out vbn, lbn, and count

}

Requirements

Target platform

Universal

Header

Ntifs.h (include Ntifs.h)

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

IRQL

<= APC_LEVEL

See also

FsRtlAddLargeMcbEntry
FsRtlInitializeLargeMcb
FsRtlLookupLargeMcbEntry
FsRtlLookupLastLargeMcbEntry
FsRtlLookupLastLargeMcbEntryAndIndex
FsRtlNumberOfRunsInLargeMcb
FsRtlRemoveLargeMcbEntry
FsRtlSplitLargeMcb
FsRtlTruncateLargeMcb
FsRtlUninitializeLargeMcb

 

 

Send comments about this topic to Microsoft

Show: