2 * PROJECT: ReactOS Kernel
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: ntoskrnl/include/fsrtl.h
5 * PURPOSE: Internal header for the File System Runtime Library
6 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
10 #define TAG(w,x,y,z) (((w)<<24)|((x)<<16)|((y)<<8)|(z))
14 // Define this if you want debugging support
16 #define _FSRTL_DEBUG_ 0x00
19 // These define the Debug Masks Supported
21 #define FSRTL_FASTIO_DEBUG 0x01
22 #define FSRTL_OPLOCK_DEBUG 0x02
23 #define FSRTL_TUNNEL_DEBUG 0x04
24 #define FSRTL_MCB_DEBUG 0x08
25 #define FSRTL_NAME_DEBUG 0x10
26 #define FSRTL_NOTIFY_DEBUG 0x20
27 #define FSRTL_FILELOCK_DEBUG 0x40
28 #define FSRTL_UNC_DEBUG 0x80
29 #define FSRTL_FILTER_DEBUG 0x100
30 #define FSRTL_CONTEXT_DEBUG 0x200
33 // Debug/Tracing support
36 #ifdef NEW_DEBUG_SYSTEM_IMPLEMENTED // enable when Debug Filters are implemented
37 #define FSTRACE DbgPrintEx
39 #define FSTRACE(x, ...) \
40 if (x & FsRtlpTraceLevel) DbgPrint(__VA_ARGS__)
43 #define FSTRACE(x, ...) DPRINT(__VA_ARGS__)
47 // Number of internal ERESOURCE structures allocated for callers to request
49 #define FSRTL_MAX_RESOURCES 16
52 // Number of maximum pair count per MCB
54 #define MAXIMUM_PAIR_COUNT 15
57 // Notifications flags
59 #define CLEANUP_IN_PROCESS 4
62 // Internal structure for NOTIFY_SYNC
64 typedef struct _REAL_NOTIFY_SYNC
67 ULONG_PTR OwningThread
;
69 } REAL_NOTIFY_SYNC
, * PREAL_NOTIFY_SYNC
;
72 // Internal structure for notifications
74 typedef struct _NOTIFY_CHANGE
76 PREAL_NOTIFY_SYNC NotifySync
;
79 PCHECK_FOR_TRAVERSE_ACCESS TraverseCallback
;
80 PSECURITY_SUBJECT_CONTEXT SubjectContext
;
81 PSTRING FullDirectoryName
;
82 PLIST_ENTRY NotifyList
;
83 PLIST_ENTRY NotifyIrps
;
84 PFILTER_REPORT_CHANGE FilterCallback
;
87 ULONG CompletionFilter
;
88 PVOID AllocatedBuffer
;
91 ULONG ThisBufferLength
;
95 PEPROCESS OwningProcess
;
96 } NOTIFY_CHANGE
, *PNOTIFY_CHANGE
;
99 // Internal structure for MCB Mapping pointer
101 typedef struct _INT_MAPPING
105 } INT_MAPPING
, *PINT_MAPPING
;
108 // Initialization Routines
112 FsRtlInitializeLargeMcbs(
117 // File contexts Routines
121 FsRtlPTeardownPerFileObjectContexts(
122 IN PFILE_OBJECT FileObject
132 // Global data inside the File System Runtime Library
134 extern PERESOURCE FsRtlPagingIoResources
;
135 extern PUCHAR _FsRtlLegalAnsiCharacterArray
;
136 extern PAGED_LOOKASIDE_LIST FsRtlFileLockLookasideList
;