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)
10 // Define this if you want debugging support
12 #define _FSRTL_DEBUG_ 0x00
15 // These define the Debug Masks Supported
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
29 // Debug/Tracing support
32 #ifdef NEW_DEBUG_SYSTEM_IMPLEMENTED // enable when Debug Filters are implemented
33 #define FSTRACE DbgPrintEx
35 #define FSTRACE(x, ...) \
36 if (x & FsRtlpTraceLevel) DbgPrint(__VA_ARGS__)
39 #define FSTRACE(x, ...) DPRINT(__VA_ARGS__)
43 // Number of internal ERESOURCE structures allocated for callers to request
45 #define FSRTL_MAX_RESOURCES 16
48 // Number of maximum pair count per MCB
50 #define MAXIMUM_PAIR_COUNT 15
53 // Notifications flags
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
63 // Internal structure for NOTIFY_SYNC
65 typedef struct _REAL_NOTIFY_SYNC
68 ULONG_PTR OwningThread
;
70 } REAL_NOTIFY_SYNC
, * PREAL_NOTIFY_SYNC
;
73 // Internal structure for notifications
75 typedef struct _NOTIFY_CHANGE
77 PREAL_NOTIFY_SYNC NotifySync
;
80 PCHECK_FOR_TRAVERSE_ACCESS TraverseCallback
;
81 PSECURITY_SUBJECT_CONTEXT SubjectContext
;
82 PSTRING FullDirectoryName
;
83 LIST_ENTRY NotifyList
;
84 LIST_ENTRY NotifyIrps
;
85 PFILTER_REPORT_CHANGE FilterCallback
;
88 ULONG CompletionFilter
;
89 PVOID AllocatedBuffer
;
92 ULONG ThisBufferLength
;
96 PEPROCESS OwningProcess
;
97 } NOTIFY_CHANGE
, *PNOTIFY_CHANGE
;
100 // Internal structure for MCB Mapping pointer
102 typedef struct _INT_MAPPING
106 } INT_MAPPING
, *PINT_MAPPING
;
109 // Initialization Routines
113 FsRtlInitializeLargeMcbs(
119 FsRtlInitializeTunnels(
124 // File contexts Routines
128 FsRtlPTeardownPerFileObjectContexts(
129 IN PFILE_OBJECT FileObject
139 // Global data inside the File System Runtime Library
141 extern PERESOURCE FsRtlPagingIoResources
;
142 extern PAGED_LOOKASIDE_LIST FsRtlFileLockLookasideList
;