ReactOS  0.4.15-dev-5496-g599ba9c
fsrtl.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Kernel
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: ntoskrnl/include/internal/fsrtl.h
5  * PURPOSE: Internal header for the File System Runtime Library
6  * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
7  */
8 
9 //
10 // Define this if you want debugging support
11 //
12 #define _FSRTL_DEBUG_ 0x00
13 
14 //
15 // These define the Debug Masks Supported
16 //
17 #define FSRTL_FASTIO_DEBUG 0x01
18 #define FSRTL_OPLOCK_DEBUG 0x02
19 #define FSRTL_TUNNEL_DEBUG 0x04
20 #define FSRTL_MCB_DEBUG 0x08
21 #define FSRTL_NAME_DEBUG 0x10
22 #define FSRTL_NOTIFY_DEBUG 0x20
23 #define FSRTL_FILELOCK_DEBUG 0x40
24 #define FSRTL_UNC_DEBUG 0x80
25 #define FSRTL_FILTER_DEBUG 0x100
26 #define FSRTL_CONTEXT_DEBUG 0x200
27 
28 //
29 // Debug/Tracing support
30 //
31 #if _FSRTL_DEBUG_
32 #ifdef NEW_DEBUG_SYSTEM_IMPLEMENTED // enable when Debug Filters are implemented
33 #define FSTRACE DbgPrintEx
34 #else
35 #define FSTRACE(x, ...) \
36  if (x & FsRtlpTraceLevel) DbgPrint(__VA_ARGS__)
37 #endif
38 #else
39 #define FSTRACE(x, ...) DPRINT(__VA_ARGS__)
40 #endif
41 
42 //
43 // Number of internal ERESOURCE structures allocated for callers to request
44 //
45 #define FSRTL_MAX_RESOURCES 16
46 
47 //
48 // Number of maximum pair count per MCB
49 //
50 #define MAXIMUM_PAIR_COUNT 15
51 
52 //
53 // Notifications flags
54 //
55 #define WATCH_TREE 0x01
56 #define NOTIFY_IMMEDIATELY 0x02
57 #define CLEANUP_IN_PROCESS 0x04
58 #define NOTIFY_LATER 0x08
59 #define WATCH_ROOT 0x10
60 #define DELETE_IN_PROCESS 0x20
61 
62 //
63 // Internal structure for NOTIFY_SYNC
64 //
65 typedef struct _REAL_NOTIFY_SYNC
66 {
71 
72 //
73 // Internal structure for notifications
74 //
75 typedef struct _NOTIFY_CHANGE
76 {
98 
99 //
100 // Internal structure for MCB Mapping pointer
101 //
102 typedef struct _INT_MAPPING
103 {
105  LBN Lbn;
107 
108 //
109 // Initialization Routines
110 //
111 CODE_SEG("INIT")
112 VOID
113 NTAPI
115  VOID
116 );
117 
118 CODE_SEG("INIT")
119 VOID
120 NTAPI
122  VOID
123 );
124 
125 //
126 // File contexts Routines
127 //
128 VOID
129 NTAPI
132 );
133 
134 CODE_SEG("INIT")
135 BOOLEAN
136 NTAPI
138  VOID
139 );
140 
141 //
142 // Global data inside the File System Runtime Library
143 //
146 
147 //
148 // File locking routine
149 //
150 NTSTATUS
151 NTAPI
154 
155 VOID
156 NTAPI
158 
159 NTSTATUS
160 NTAPI
162 
164 NTSTATUS
165 NTAPI
169 
170 VOID
171 NTAPI
PERESOURCE FsRtlPagingIoResources
Definition: fsrtlpc.c:17
_In_ PLARGE_INTEGER EndingOffset
Definition: iotypes.h:1597
#define IN
Definition: typedefs.h:39
PVOID FsContext
Definition: fsrtl.h:78
struct _REAL_NOTIFY_SYNC REAL_NOTIFY_SYNC
ULONG ThisBufferLength
Definition: fsrtl.h:92
PSTRING FullDirectoryName
Definition: fsrtl.h:82
BOOLEAN NTAPI FsRtlInitSystem(VOID)
Definition: fsrtlpc.c:161
NTSTATUS NTAPI FsRtlAcquireToCreateMappedSection(_In_ PFILE_OBJECT FileObject, _In_ ULONG SectionPageProtection)
Definition: fastio.c:1647
_In_ PLARGE_INTEGER _Out_ struct _ERESOURCE ** ResourceToRelease
Definition: iotypes.h:1598
VOID NTAPI FsRtlReleaseFileForCcFlush(IN PFILE_OBJECT FileObject)
Definition: fastio.c:1765
PVOID StreamID
Definition: fsrtl.h:79
PVOID Buffer
Definition: fsrtl.h:90
LONG NTSTATUS
Definition: precomp.h:26
VOID NTAPI FsRtlReleaseFileForModWrite(IN PFILE_OBJECT FileObject, IN PERESOURCE ResourceToRelease)
PCHECK_FOR_TRAVERSE_ACCESS TraverseCallback
Definition: fsrtl.h:80
VOID NTAPI FsRtlPTeardownPerFileObjectContexts(IN PFILE_OBJECT FileObject)
Definition: filtrctx.c:28
NTSTATUS NTAPI FsRtlAcquireFileForCcFlushEx(IN PFILE_OBJECT FileObject)
Definition: fastio.c:1692
ULONG ReferenceCount
Definition: fsrtl.h:95
PVOID AllocatedBuffer
Definition: fsrtl.h:89
BOOLEAN(NTAPI * PFILTER_REPORT_CHANGE)(_In_ PVOID NotifyContext, _In_ PVOID FilterContext)
Definition: fsrtltypes.h:297
ULONG DataLength
Definition: fsrtl.h:93
VOID NTAPI FsRtlInitializeTunnels(VOID)
Definition: tunnel.c:200
uint32_t ULONG_PTR
Definition: typedefs.h:65
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_opt_ PLARGE_INTEGER _In_ ULONG SectionPageProtection
Definition: mmfuncs.h:360
struct _REAL_NOTIFY_SYNC * PREAL_NOTIFY_SYNC
ERESOURCE * PERESOURCE
Definition: env_spec_w32.h:595
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
BOOLEAN(NTAPI * PCHECK_FOR_TRAVERSE_ACCESS)(_In_ PVOID NotifyContext, _In_opt_ PVOID TargetContext, _In_ PSECURITY_SUBJECT_CONTEXT SubjectContext)
Definition: fsrtltypes.h:291
PAGED_LOOKASIDE_LIST FsRtlFileLockLookasideList
Definition: filelock.c:17
PSECURITY_SUBJECT_CONTEXT SubjectContext
Definition: fsrtl.h:81
unsigned char BOOLEAN
LIST_ENTRY NotifyIrps
Definition: fsrtl.h:84
#define _In_
Definition: ms_sal.h:308
_Check_return_ NTSTATUS NTAPI FsRtlAcquireFileForModWriteEx(_In_ PFILE_OBJECT FileObject, _In_ PLARGE_INTEGER EndingOffset, _Outptr_result_maybenull_ PERESOURCE *ResourceToRelease)
Lock a file object before flushing pages to disk. To be called by the Modified Page Writer (MPW)
Definition: fastio.c:1852
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:547
VOID NTAPI FsRtlInitializeLargeMcbs(VOID)
Definition: largemcb.c:479
VBN Vbn
Definition: fsrtl.h:104
FAST_MUTEX
Definition: extypes.h:17
struct _INT_MAPPING * PINT_MAPPING
PFILTER_REPORT_CHANGE FilterCallback
Definition: fsrtl.h:85
struct _INT_MAPPING INT_MAPPING
PEPROCESS OwningProcess
Definition: fsrtl.h:96
* PFILE_OBJECT
Definition: iotypes.h:1998
ULONG BufferLength
Definition: fsrtl.h:91
LBN Lbn
Definition: fsrtl.h:105
unsigned char UCHAR
Definition: xmlstorage.h:181
USHORT Flags
Definition: fsrtl.h:86
PREAL_NOTIFY_SYNC NotifySync
Definition: fsrtl.h:77
Definition: typedefs.h:119
ULONG VBN
Definition: fsrtltypes.h:7
#define _Check_return_
Definition: ms_sal.h:557
struct _NOTIFY_CHANGE * PNOTIFY_CHANGE
LIST_ENTRY NotifyList
Definition: fsrtl.h:83
struct LOOKASIDE_ALIGN _PAGED_LOOKASIDE_LIST PAGED_LOOKASIDE_LIST
unsigned short USHORT
Definition: pedump.c:61
UCHAR CharacterSize
Definition: fsrtl.h:87
unsigned int ULONG
Definition: retypes.h:1
#define _Outptr_result_maybenull_
Definition: ms_sal.h:428
ULONG_PTR OwningThread
Definition: fsrtl.h:68
ULONG CompletionFilter
Definition: fsrtl.h:88
ULONG OwnerCount
Definition: fsrtl.h:69
struct _NOTIFY_CHANGE NOTIFY_CHANGE
static CODE_SEG("PAGE")
Definition: isapnp.c:1482
FAST_MUTEX FastMutex
Definition: fsrtl.h:67
ULONG LastEntry
Definition: fsrtl.h:94