ReactOS 0.4.15-dev-6661-gcc6e444
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//
65typedef struct _REAL_NOTIFY_SYNC
66{
71
72//
73// Internal structure for notifications
74//
75typedef struct _NOTIFY_CHANGE
76{
98
99//
100// Internal structure for MCB Mapping pointer
101//
102typedef struct _INT_MAPPING
103{
105 LBN Lbn;
107
108//
109// Initialization Routines
110//
111CODE_SEG("INIT")
112VOID
113NTAPI
115 VOID
116);
117
118CODE_SEG("INIT")
119VOID
120NTAPI
122 VOID
123);
124
125//
126// File contexts Routines
127//
128VOID
129NTAPI
132);
133
134CODE_SEG("INIT")
136NTAPI
138 VOID
139);
140
141//
142// Global data inside the File System Runtime Library
143//
146
147//
148// File locking routine
149//
151NTAPI
154
155VOID
156NTAPI
158
160NTAPI
162
165NTAPI
169
170VOID
171NTAPI
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
ERESOURCE * PERESOURCE
Definition: env_spec_w32.h:595
struct _INT_MAPPING INT_MAPPING
_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
PAGED_LOOKASIDE_LIST FsRtlFileLockLookasideList
Definition: filelock.c:17
struct _REAL_NOTIFY_SYNC * PREAL_NOTIFY_SYNC
VOID NTAPI FsRtlPTeardownPerFileObjectContexts(IN PFILE_OBJECT FileObject)
Definition: filtrctx.c:28
PERESOURCE FsRtlPagingIoResources
Definition: fsrtlpc.c:17
VOID NTAPI FsRtlReleaseFileForModWrite(IN PFILE_OBJECT FileObject, IN PERESOURCE ResourceToRelease)
VOID NTAPI FsRtlInitializeTunnels(VOID)
Definition: tunnel.c:200
NTSTATUS NTAPI FsRtlAcquireFileForCcFlushEx(IN PFILE_OBJECT FileObject)
Definition: fastio.c:1692
VOID NTAPI FsRtlReleaseFileForCcFlush(IN PFILE_OBJECT FileObject)
Definition: fastio.c:1765
BOOLEAN NTAPI FsRtlInitSystem(VOID)
Definition: fsrtlpc.c:161
struct _INT_MAPPING * PINT_MAPPING
struct _NOTIFY_CHANGE NOTIFY_CHANGE
struct _REAL_NOTIFY_SYNC REAL_NOTIFY_SYNC
VOID NTAPI FsRtlInitializeLargeMcbs(VOID)
Definition: largemcb.c:479
struct _NOTIFY_CHANGE * PNOTIFY_CHANGE
NTSTATUS NTAPI FsRtlAcquireToCreateMappedSection(_In_ PFILE_OBJECT FileObject, _In_ ULONG SectionPageProtection)
Definition: fastio.c:1647
BOOLEAN(NTAPI * PCHECK_FOR_TRAVERSE_ACCESS)(_In_ PVOID NotifyContext, _In_opt_ PVOID TargetContext, _In_ PSECURITY_SUBJECT_CONTEXT SubjectContext)
Definition: fsrtltypes.h:291
ULONG VBN
Definition: fsrtltypes.h:7
BOOLEAN(NTAPI * PFILTER_REPORT_CHANGE)(_In_ PVOID NotifyContext, _In_ PVOID FilterContext)
Definition: fsrtltypes.h:297
static CODE_SEG("PAGE")
Definition: isapnp.c:1482
#define _Outptr_result_maybenull_
Definition: ms_sal.h:428
#define _Check_return_
Definition: ms_sal.h:557
#define _In_
Definition: ms_sal.h:308
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_opt_ PLARGE_INTEGER _In_ ULONG SectionPageProtection
Definition: mmfuncs.h:363
unsigned short USHORT
Definition: pedump.c:61
LBN Lbn
Definition: fsrtl.h:105
VBN Vbn
Definition: fsrtl.h:104
Definition: typedefs.h:120
PSTRING FullDirectoryName
Definition: fsrtl.h:82
ULONG BufferLength
Definition: fsrtl.h:91
PVOID Buffer
Definition: fsrtl.h:90
PVOID FsContext
Definition: fsrtl.h:78
PVOID AllocatedBuffer
Definition: fsrtl.h:89
USHORT Flags
Definition: fsrtl.h:86
LIST_ENTRY NotifyIrps
Definition: fsrtl.h:84
ULONG CompletionFilter
Definition: fsrtl.h:88
PSECURITY_SUBJECT_CONTEXT SubjectContext
Definition: fsrtl.h:81
PEPROCESS OwningProcess
Definition: fsrtl.h:96
ULONG DataLength
Definition: fsrtl.h:93
ULONG LastEntry
Definition: fsrtl.h:94
ULONG ReferenceCount
Definition: fsrtl.h:95
PREAL_NOTIFY_SYNC NotifySync
Definition: fsrtl.h:77
PVOID StreamID
Definition: fsrtl.h:79
UCHAR CharacterSize
Definition: fsrtl.h:87
LIST_ENTRY NotifyList
Definition: fsrtl.h:83
ULONG ThisBufferLength
Definition: fsrtl.h:92
PFILTER_REPORT_CHANGE FilterCallback
Definition: fsrtl.h:85
PCHECK_FOR_TRAVERSE_ACCESS TraverseCallback
Definition: fsrtl.h:80
ULONG_PTR OwningThread
Definition: fsrtl.h:68
ULONG OwnerCount
Definition: fsrtl.h:69
FAST_MUTEX FastMutex
Definition: fsrtl.h:67
#define NTAPI
Definition: typedefs.h:36
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:550
FAST_MUTEX
Definition: extypes.h:17
struct LOOKASIDE_ALIGN _PAGED_LOOKASIDE_LIST PAGED_LOOKASIDE_LIST
_In_ PLARGE_INTEGER _Out_ struct _ERESOURCE ** ResourceToRelease
Definition: iotypes.h:1598
* PFILE_OBJECT
Definition: iotypes.h:1998
_In_ PLARGE_INTEGER EndingOffset
Definition: iotypes.h:1597
unsigned char UCHAR
Definition: xmlstorage.h:181