91#define CcpFlushCache(M,F,L,I,D) _CcpFlushCache(M,F,L,I,D,__FILE__,__LINE__)
114#define KEBUGCHECKCC \
115 KEBUGCHECKEX(CACHE_MANAGER, \
116 (*(ULONG*)(__FILE__ + sizeof(__FILE__) - 4) << 16) | \
117 (__LINE__ & 0xFFFF), 0, 0, 0)
121#define CACHE_SINGLE_FILE_MAX (16)
122#define CACHE_OVERALL_SIZE (32 * 1024 * 1024)
123#define CACHE_STRIPE VACB_MAPPING_GRANULARITY
124#define CACHE_SHIFT 18
125#define CACHE_NUM_SECTIONS (CACHE_OVERALL_SIZE / CACHE_STRIPE)
126#define CACHE_ROUND_UP(x) (((x) + (CACHE_STRIPE-1)) & ~(CACHE_STRIPE-1))
127#define CACHE_ROUND_DOWN(x) ((x) & ~(CACHE_STRIPE-1))
128#define INVALID_CACHE ((ULONG)~0)
138#define CcpLock() _CcpLock(__FILE__,__LINE__)
139#define CcpUnlock() _CcpUnlock(__FILE__,__LINE__)
static CC_FILE_SIZES FileSizes
BOOL Delete(LPCTSTR ServiceName)
_In_ PFCB _In_ LONGLONG FileOffset
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
IN PFCB IN FAT_FLUSH_TYPE FlushType
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _Outptr_ PMDL * MdlChain
_Must_inspect_result_ _In_ PDEVICE_OBJECT _In_ PSECTION_OBJECT_POINTERS SectionObjectPointer
__in UCHAR __in POWER_STATE __in_opt PVOID __in PIO_STATUS_BLOCK IoStatus
BOOLEAN NTAPI CcpMapData(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PVOID *BcbResult, OUT PVOID *Buffer)
BOOLEAN NTAPI CcpUnpinData(PNOCC_BCB Bcb, BOOLEAN ActuallyRelease)
BOOLEAN NTAPI CcGetFileSizes(PFILE_OBJECT FileObject, PCC_FILE_SIZES FileSizes)
VOID NTAPI CcShutdownSystem(VOID)
NOCC_BCB CcCacheSections[CACHE_NUM_SECTIONS]
VOID NTAPI CcMdlReadComplete2(IN PFILE_OBJECT FileObject, IN PMDL MemoryDescriptorList)
struct _NOCC_BCB NOCC_BCB
VOID NTAPI _CcpFlushCache(IN PNOCC_CACHE_MAP Map, IN OPTIONAL PLARGE_INTEGER FileOffset, IN ULONG Length, OUT OPTIONAL PIO_STATUS_BLOCK IoStatus, BOOLEAN Delete, const char *File, int Line)
VOID NTAPI CcInitCacheZeroPage(VOID)
BOOLEAN NTAPI CcpPinMappedData(IN PNOCC_CACHE_MAP Map, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, IN OUT PVOID *Bcb)
VOID NTAPI CcMdlWriteComplete2(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN PMDL MdlChain)
struct _NOCC_BCB * PNOCC_BCB
VOID _CcpLock(const char *file, int line)
struct _NOCC_CACHE_MAP * PNOCC_CACHE_MAP
VOID NTAPI CcpReleaseFileLock(PNOCC_CACHE_MAP Map)
VOID CcpReferenceCache(ULONG Sector)
VOID NTAPI CcInitView(VOID)
LIST_ENTRY CcPendingUnmap
VOID CcpDereferenceCache(ULONG Sector, BOOLEAN Immediate)
PRTL_BITMAP CcCacheBitmap
struct _NOCC_CACHE_MAP NOCC_CACHE_MAP
ULONG NTAPI CcpCountCacheSections(PNOCC_CACHE_MAP Map)
ULONG MmGetReferenceCountPageWithoutLock(PFN_NUMBER Page)
BOOLEAN NTAPI CcFlushImageSection(PSECTION_OBJECT_POINTERS SectionObjectPointer, MMFLUSH_TYPE FlushType)
VOID NTAPI CcPfInitializePrefetcher(VOID)
#define CACHE_NUM_SECTIONS
VOID _CcpUnlock(const char *file, int line)
BOOLEAN NTAPI CcpAcquireFileLock(PNOCC_CACHE_MAP Map)
_In_ ULONG _In_ ULONG _In_ ULONG Length
_In_ PVOID _Out_opt_ BOOLEAN _Out_opt_ PPFN_NUMBER Page
ULONG NTAPI MmGetReferenceCountPage(PFN_NUMBER Page)
PULONG MinorVersion OPTIONAL
struct _NOCC_CACHE_MAP * Map
CACHE_MANAGER_CALLBACKS Callbacks
ULONG ReadAheadGranularity
LIST_ENTRY PrivateCacheMaps
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_Must_inspect_result_ _In_ ULONG Flags
VOID(NTAPI * PFLUSH_TO_LSN)(_In_ PVOID LogHandle, _In_ LARGE_INTEGER Lsn)
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
_Inout_ PMDL MemoryDescriptorList