+FSRTL_COMMON_FCB_HEADER
[reactos.git] / include / ddk / ntifs.h
1 #ifndef __INCLUDE_DDK_NTIFS_H
2 #define __INCLUDE_DDK_NTIFS_H
3
4 struct _BCB;
5
6 typedef struct _BCB* PBCB;
7
8 struct _MEMORY_AREA;
9
10 struct _CACHE_SEGMENT;
11
12 typedef struct _CACHE_SEGMENT* PCACHE_SEGMENT;
13
14 NTSTATUS STDCALL
15 CcRosReleaseCacheSegment (struct _BCB*          Bcb,
16                           struct _CACHE_SEGMENT*        CacheSeg,
17                           BOOLEAN               Valid,
18                           BOOLEAN Dirty,
19                           BOOLEAN Mapped);
20 NTSTATUS STDCALL
21 CcRosRequestCacheSegment (struct _BCB*          Bcb,
22                        ULONG            FileOffset,
23                        PVOID* BaseAddress,
24                        PBOOLEAN UptoDate,
25                        struct _CACHE_SEGMENT** CacheSeg);
26 NTSTATUS STDCALL
27 CcRosInitializeFileCache (PFILE_OBJECT  FileObject,
28                        struct _BCB** Bcb,
29                        ULONG CacheSegmentSize);
30 NTSTATUS STDCALL
31 CcRosReleaseFileCache (PFILE_OBJECT     FileObject,
32                     struct _BCB*                Bcb);
33
34 #include <ddk/cctypes.h>
35
36 #include <ddk/ccfuncs.h>
37
38 #include <ddk/fstypes.h>
39 #include <ddk/fsfuncs.h>
40
41 typedef struct _FSRTL_COMMON_FCB_HEADER
42 {
43     CSHORT NodeTypeCode;
44     CSHORT NodeByteSize;
45     UCHAR Flags;
46     UCHAR IsFastIoPossible; // really type FAST_IO_POSSIBLE
47     UCHAR Flags2;
48     UCHAR Reserved;     /* always 0 */
49     PERESOURCE Resource;
50     PERESOURCE PagingIoResource;
51     LARGE_INTEGER AllocationSize;
52     LARGE_INTEGER FileSize;
53     LARGE_INTEGER ValidDataLength;
54 } FSRTL_COMMON_FCB_HEADER;
55 typedef FSRTL_COMMON_FCB_HEADER *PFSRTL_COMMON_FCB_HEADER;
56
57 //  This Fcb header is used for files which support caching
58 //  of compressed data, and related new support.
59
60 typedef struct _FSRTL_ADVANCED_FCB_HEADER
61 {
62     FSRTL_COMMON_FCB_HEADER common_fcb_header;
63
64     //  The following two fields are supported only if
65     //  Flags2 contains FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS
66     //
67     //  This is a pointer to a Fast Mutex which may be used to
68     //  properly synchronize access to the FsRtl header.  The
69     //  Fast Mutex must be nonpaged.
70     PFAST_MUTEX FastMutex;
71
72     // This is a pointer to a list of context structures belonging to
73     // filesystem filter drivers that are linked above the filesystem.
74     // Each structure is headed by FSRTL_FILTER_CONTEXT.
75     LIST_ENTRY FilterContexts;
76 } FSRTL_ADVANCED_FCB_HEADER;
77 typedef FSRTL_ADVANCED_FCB_HEADER *PFSRTL_ADVANCED_FCB_HEADER;
78
79 #endif /* __INCLUDE_DDK_NTIFS_H */