FsRtlAddLargeMcbEntry function (ntifs.h)

The FsRtlAddLargeMcbEntry routine adds a new mapping to an existing map control block (MCB).

Syntax

BOOLEAN FsRtlAddLargeMcbEntry(
  PLARGE_MCB Mcb,
  LONGLONG   Vbn,
  LONGLONG   Lbn,
  LONGLONG   SectorCount
);

Parameters

Mcb

Pointer to an initialized MCB structure.

Vbn

Starting virtual block number (VBN) of the new mapping run to be added to the MCB.

Lbn

Logical block number (LBN) to which LargeVbn is to be mapped.

SectorCount

Number of sectors in the new mapping run.

Return value

FsRtlAddLargeMcbEntry returns TRUE if the new mapping was successfully added to the MCB, FALSE otherwise.

Remarks

FsRtlAddLargeMcbEntry adds a new mapping to an existing map control block (MCB). File systems use MCB structures to map virtual block numbers (VBN) for a file to the corresponding logical block numbers (LBN) on disk.

Note   The upper 32 bits of the LBN are ignored, but they must be set to zero. Only the lower 32 bits are used.
 
If a new mapping run to be added overlaps an existing mapping run, FsRtlAddLargeMcbEntry merges them into a single mapping run.

If a pool allocation failure occurs, FsRtlAddLargeMcbEntry raises a STATUS_INSUFFICIENT_RESOURCES exception. To gain control if this pool allocation failure occurs, the driver should wrap the call to FsRtlAddLargeMcbEntry in a try-except or try-finally statement.

To initialize an MCB, call FsRtlInitializeLargeMcb. To uninitialize an MCB, call FsRtlUninitializeLargeMcb.

Requirements

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

See also

FsRtlGetNextLargeMcbEntry

FsRtlInitializeLargeMcb

FsRtlLookupLargeMcbEntry

FsRtlLookupLastLargeMcbEntry

FsRtlLookupLastLargeMcbEntryAndIndex

FsRtlNumberOfRunsInLargeMcb

FsRtlRemoveLargeMcbEntry

FsRtlSplitLargeMcb

FsRtlTruncateLargeMcb

FsRtlUninitializeLargeMcb