1 /* $Id: mcb.c,v 1.12 2004/06/23 00:42:21 ion Exp $
3 * reactos/ntoskrnl/fs/mcb.c
9 #include <internal/debug.h>
11 /**********************************************************************
25 FsRtlAddLargeMcbEntry(IN PLARGE_MCB Mcb
,
28 IN LONGLONG SectorCount
)
35 * FsRtlAddMcbEntry: Obsolete
40 FsRtlAddMcbEntry (IN PMCB Mcb
,
45 return FsRtlAddLargeMcbEntry(& Mcb
->LargeMcb
,
48 (LONGLONG
) SectorCount
);
55 FsRtlGetNextLargeMcbEntry(IN PLARGE_MCB Mcb
,
59 OUT PLONGLONG SectorCount
)
70 FsRtlGetNextMcbEntry (IN PMCB Mcb
,
74 OUT PULONG SectorCount
)
79 LONGLONG llSectorCount
;
81 // FIXME: how should conversion be done
82 // FIXME: between 32 and 64 bits?
83 rc
=FsRtlGetNextLargeMcbEntry (& Mcb
->LargeMcb
,
96 FsRtlInitializeLargeMcb(IN PLARGE_MCB Mcb
,
97 IN POOL_TYPE PoolType
)
100 Mcb
->PoolType
= PoolType
;
104 * FsRtlInitializeMcb: Obsolete
108 FsRtlInitializeMcb (IN PMCB Mcb
,
109 IN POOL_TYPE PoolType
)
111 FsRtlInitializeLargeMcb(& Mcb
->LargeMcb
, PoolType
);
119 FsRtlLookupLargeMcbEntry(IN PLARGE_MCB Mcb
,
121 OUT PLONGLONG Lbn OPTIONAL
,
122 OUT PLONGLONG SectorCountFromLbn OPTIONAL
,
123 OUT PLONGLONG StartingLbn OPTIONAL
,
124 OUT PLONGLONG SectorCountFromStartingLbn OPTIONAL
,
125 OUT PULONG Index OPTIONAL
)
136 FsRtlLookupLastLargeMcbEntryAndIndex (
137 IN PLARGE_MCB OpaqueMcb
,
138 OUT PLONGLONG LargeVbn
,
139 OUT PLONGLONG LargeLbn
,
151 PFSRTL_PER_STREAM_CONTEXT
152 FsRtlLookupPerStreamContextInternal (
153 IN PFSRTL_ADVANCED_FCB_HEADER StreamContext
,
154 IN PVOID OwnerId OPTIONAL
,
155 IN PVOID InstanceId OPTIONAL
166 PVOID
/* PFSRTL_PER_FILE_OBJECT_CONTEXT*/
167 FsRtlLookupPerFileObjectContext (
168 IN PFSRTL_ADVANCED_FCB_HEADER StreamContext
,
169 IN PVOID OwnerId OPTIONAL
,
170 IN PVOID InstanceId OPTIONAL
181 FsRtlLookupLastLargeMcbEntry(IN PLARGE_MCB Mcb
,
194 FsRtlLookupLastMcbEntry (IN PMCB Mcb
,
207 FsRtlLookupMcbEntry (IN PMCB Mcb
,
210 OUT PULONG SectorCount OPTIONAL
,
222 FsRtlNumberOfRunsInLargeMcb(IN PLARGE_MCB Mcb
)
225 ExAcquireFastMutex (Mcb
->FastMutex
);
226 NumberOfRuns
=Mcb
->PairCount
;
227 ExReleaseFastMutex (Mcb
->FastMutex
);
228 return(NumberOfRuns
);
233 * FsRtlNumberOfRunsInMcb: Obsolete
238 FsRtlNumberOfRunsInMcb (IN PMCB Mcb
)
240 return FsRtlNumberOfRunsInLargeMcb(& Mcb
->LargeMcb
);
248 FsRtlRemoveLargeMcbEntry(IN PLARGE_MCB Mcb
,
250 IN LONGLONG SectorCount
)
260 FsRtlRemoveMcbEntry (IN PMCB Mcb
,
262 IN ULONG SectorCount
)
275 IN BOOLEAN SelfSynchronized
285 FsRtlSplitLargeMcb(IN PLARGE_MCB Mcb
,
298 FsRtlTruncateLargeMcb(IN PLARGE_MCB Mcb
,
306 * FsRtlTruncateMcb: Obsolete
311 FsRtlTruncateMcb (IN PMCB Mcb
,
314 FsRtlTruncateLargeMcb (& Mcb
->LargeMcb
, (LONGLONG
) Vbn
);
322 FsRtlUninitializeLargeMcb(IN PLARGE_MCB Mcb
)
328 * FsRtlUninitializeMcb: Obsolete
333 FsRtlUninitializeMcb (IN PMCB Mcb
)
335 FsRtlUninitializeLargeMcb(& Mcb
->LargeMcb
);