Export (0) Print
Expand All
Expand Minimize

FsRtlAddLargeMcbEntry routine

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

Syntax


BOOLEAN FsRtlAddLargeMcbEntry(
  _In_  PLARGE_MCB OpaqueMcb,
  _In_  LONGLONG LargeVbn,
  _In_  LONGLONG LargeLbn,
  _In_  LONGLONG LargeSectorCount
);

Parameters

OpaqueMcb [in]

Pointer to an initialized MCB structure.

LargeVbn [in]

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

LargeLbn [in]

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

LargeSectorCount [in]

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

Header

Ntifs.h (include Ntifs.h)

Library

Ntoskrnl.lib

IRQL

<= APC_LEVEL

See also

FsRtlGetNextLargeMcbEntry
FsRtlInitializeLargeMcb
FsRtlLookupLargeMcbEntry
FsRtlLookupLastLargeMcbEntry
FsRtlLookupLastLargeMcbEntryAndIndex
FsRtlNumberOfRunsInLargeMcb
FsRtlRemoveLargeMcbEntry
FsRtlSplitLargeMcb
FsRtlTruncateLargeMcb
FsRtlUninitializeLargeMcb

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft