1 #ifndef __INCLUDE_INTERNAL_CC_H
2 #define __INCLUDE_INTERNAL_CC_H
10 LIST_ENTRY BcbSegmentListHead;
11 PFILE_OBJECT FileObject;
12 ULONG CacheSegmentSize;
13 LARGE_INTEGER AllocationSize;
14 LARGE_INTEGER FileSize;
19 typedef struct _CACHE_SEGMENT
21 /* Base address of the region where the cache segment data is mapped. */
24 * Memory area representing the region where the cache segment data is
27 struct _MEMORY_AREA* MemoryArea;
28 /* Are the contents of the cache segment data valid. */
30 /* Are the contents of the cache segment data newer than those on disk. */
33 /* Entry in the list of segments for this BCB. */
34 LIST_ENTRY BcbSegmentListEntry;
35 /* Entry in the list of segments which are dirty. */
36 LIST_ENTRY DirtySegmentListEntry;
37 /* Entry in the list of segments. */
38 LIST_ENTRY CacheSegmentListEntry;
39 LIST_ENTRY CacheSegmentLRUListEntry;
40 /* Offset in the file which this cache segment maps. */
44 /* Number of references. */
46 /* Pointer to the BCB for the file which this cache segment maps data for. */
48 /* Pointer to the next cache segment in a chain. */
49 struct _CACHE_SEGMENT* NextInChain;
52 #endif /* LIBCAPTIVE */
55 CcMdlReadCompleteDev (IN PMDL MdlChain,
56 IN PDEVICE_OBJECT DeviceObject);
58 CcRosGetCacheSegment(PBCB Bcb,
63 PCACHE_SEGMENT* CacheSeg);
68 NTSTATUS STDCALL CcRosFreeCacheSegment(PBCB, PCACHE_SEGMENT);
70 NTSTATUS ReadCacheSegment(PCACHE_SEGMENT CacheSeg);
72 NTSTATUS WriteCacheSegment(PCACHE_SEGMENT CacheSeg);
76 CcRosUnmapCacheSegment(PBCB Bcb, ULONG FileOffset, BOOLEAN NowDirty);
78 CcRosSuggestFreeCacheSegment(PBCB Bcb, ULONG FileOffset, BOOLEAN NowDirty);
80 CcRosGetCacheSegmentChain(PBCB Bcb,
83 PCACHE_SEGMENT* CacheSeg);
84 VOID CcInitCacheZeroPage(VOID);
86 CcRosMarkDirtyCacheSegment(PBCB Bcb, ULONG FileOffset);
88 CcRosFlushDirtyPages(ULONG Target, PULONG Count);
90 VOID CcRosDereferenceCache(PFILE_OBJECT FileObject);
91 VOID CcRosReferenceCache(PFILE_OBJECT FileObject);