ReactOS  0.4.14-dev-297-g23e575c
fsrtl.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _REAL_NOTIFY_SYNC
 
struct  _NOTIFY_CHANGE
 
struct  _INT_MAPPING
 

Macros

#define _FSRTL_DEBUG_   0x00
 
#define FSRTL_FASTIO_DEBUG   0x01
 
#define FSRTL_OPLOCK_DEBUG   0x02
 
#define FSRTL_TUNNEL_DEBUG   0x04
 
#define FSRTL_MCB_DEBUG   0x08
 
#define FSRTL_NAME_DEBUG   0x10
 
#define FSRTL_NOTIFY_DEBUG   0x20
 
#define FSRTL_FILELOCK_DEBUG   0x40
 
#define FSRTL_UNC_DEBUG   0x80
 
#define FSRTL_FILTER_DEBUG   0x100
 
#define FSRTL_CONTEXT_DEBUG   0x200
 
#define FSTRACE(x, ...)   DPRINT(__VA_ARGS__)
 
#define FSRTL_MAX_RESOURCES   16
 
#define MAXIMUM_PAIR_COUNT   15
 
#define WATCH_TREE   0x01
 
#define NOTIFY_IMMEDIATELY   0x02
 
#define CLEANUP_IN_PROCESS   0x04
 
#define NOTIFY_LATER   0x08
 
#define WATCH_ROOT   0x10
 
#define DELETE_IN_PROCESS   0x20
 

Typedefs

typedef struct _REAL_NOTIFY_SYNC REAL_NOTIFY_SYNC
 
typedef struct _REAL_NOTIFY_SYNCPREAL_NOTIFY_SYNC
 
typedef struct _NOTIFY_CHANGE NOTIFY_CHANGE
 
typedef struct _NOTIFY_CHANGEPNOTIFY_CHANGE
 
typedef struct _INT_MAPPING INT_MAPPING
 
typedef struct _INT_MAPPINGPINT_MAPPING
 

Functions

INIT_FUNCTION VOID NTAPI FsRtlInitializeLargeMcbs (VOID)
 
INIT_FUNCTION VOID NTAPI FsRtlInitializeTunnels (VOID)
 
VOID NTAPI FsRtlPTeardownPerFileObjectContexts (IN PFILE_OBJECT FileObject)
 
INIT_FUNCTION BOOLEAN NTAPI FsRtlInitSystem (VOID)
 

Variables

PERESOURCE FsRtlPagingIoResources
 
PAGED_LOOKASIDE_LIST FsRtlFileLockLookasideList
 

Macro Definition Documentation

◆ _FSRTL_DEBUG_

#define _FSRTL_DEBUG_   0x00

Definition at line 12 of file fsrtl.h.

◆ CLEANUP_IN_PROCESS

#define CLEANUP_IN_PROCESS   0x04

Definition at line 57 of file fsrtl.h.

◆ DELETE_IN_PROCESS

#define DELETE_IN_PROCESS   0x20

Definition at line 60 of file fsrtl.h.

◆ FSRTL_CONTEXT_DEBUG

#define FSRTL_CONTEXT_DEBUG   0x200

Definition at line 26 of file fsrtl.h.

◆ FSRTL_FASTIO_DEBUG

#define FSRTL_FASTIO_DEBUG   0x01

Definition at line 17 of file fsrtl.h.

◆ FSRTL_FILELOCK_DEBUG

#define FSRTL_FILELOCK_DEBUG   0x40

Definition at line 23 of file fsrtl.h.

◆ FSRTL_FILTER_DEBUG

#define FSRTL_FILTER_DEBUG   0x100

Definition at line 25 of file fsrtl.h.

◆ FSRTL_MAX_RESOURCES

#define FSRTL_MAX_RESOURCES   16

Definition at line 45 of file fsrtl.h.

◆ FSRTL_MCB_DEBUG

#define FSRTL_MCB_DEBUG   0x08

Definition at line 20 of file fsrtl.h.

◆ FSRTL_NAME_DEBUG

#define FSRTL_NAME_DEBUG   0x10

Definition at line 21 of file fsrtl.h.

◆ FSRTL_NOTIFY_DEBUG

#define FSRTL_NOTIFY_DEBUG   0x20

Definition at line 22 of file fsrtl.h.

◆ FSRTL_OPLOCK_DEBUG

#define FSRTL_OPLOCK_DEBUG   0x02

Definition at line 18 of file fsrtl.h.

◆ FSRTL_TUNNEL_DEBUG

#define FSRTL_TUNNEL_DEBUG   0x04

Definition at line 19 of file fsrtl.h.

◆ FSRTL_UNC_DEBUG

#define FSRTL_UNC_DEBUG   0x80

Definition at line 24 of file fsrtl.h.

◆ FSTRACE

#define FSTRACE (   x,
  ... 
)    DPRINT(__VA_ARGS__)

Definition at line 39 of file fsrtl.h.

◆ MAXIMUM_PAIR_COUNT

#define MAXIMUM_PAIR_COUNT   15

Definition at line 50 of file fsrtl.h.

◆ NOTIFY_IMMEDIATELY

#define NOTIFY_IMMEDIATELY   0x02

Definition at line 56 of file fsrtl.h.

◆ NOTIFY_LATER

#define NOTIFY_LATER   0x08

Definition at line 58 of file fsrtl.h.

◆ WATCH_ROOT

#define WATCH_ROOT   0x10

Definition at line 59 of file fsrtl.h.

◆ WATCH_TREE

#define WATCH_TREE   0x01

Definition at line 55 of file fsrtl.h.

Typedef Documentation

◆ INT_MAPPING

◆ NOTIFY_CHANGE

◆ PINT_MAPPING

◆ PNOTIFY_CHANGE

◆ PREAL_NOTIFY_SYNC

◆ REAL_NOTIFY_SYNC

Function Documentation

◆ FsRtlInitializeLargeMcbs()

INIT_FUNCTION VOID NTAPI FsRtlInitializeLargeMcbs ( VOID  )

Definition at line 478 of file largemcb.c.

479 {
480  /* Initialize the list for the MCB */
482  NULL,
483  NULL,
485  sizeof(LARGE_MCB_MAPPING),
486  IFS_POOL_TAG,
487  0); /* FIXME: Should be 4 */
488 
489  /* Initialize the list for the guarded mutex */
491  NULL,
492  NULL,
494  sizeof(KGUARDED_MUTEX),
495  IFS_POOL_TAG,
496  0); /* FIXME: Should be 32 */
497 }
VOID NTAPI ExInitializePagedLookasideList(IN PPAGED_LOOKASIDE_LIST Lookaside, IN PALLOCATE_FUNCTION Allocate OPTIONAL, IN PFREE_FUNCTION Free OPTIONAL, IN ULONG Flags, IN SIZE_T Size, IN ULONG Tag, IN USHORT Depth)
Definition: lookas.c:274
PAGED_LOOKASIDE_LIST FsRtlFirstMappingLookasideList
Definition: largemcb.c:22
smooth NULL
Definition: ftsmooth.c:416
#define IFS_POOL_TAG
Definition: tag.h:52
VOID NTAPI ExInitializeNPagedLookasideList(IN PNPAGED_LOOKASIDE_LIST Lookaside, IN PALLOCATE_FUNCTION Allocate OPTIONAL, IN PFREE_FUNCTION Free OPTIONAL, IN ULONG Flags, IN SIZE_T Size, IN ULONG Tag, IN USHORT Depth)
Definition: lookas.c:222
NPAGED_LOOKASIDE_LIST FsRtlFastMutexLookasideList
Definition: largemcb.c:23
#define POOL_RAISE_IF_ALLOCATION_FAILURE

Referenced by FsRtlInitSystem().

◆ FsRtlInitializeTunnels()

INIT_FUNCTION VOID NTAPI FsRtlInitializeTunnels ( VOID  )

Definition at line 199 of file tunnel.c.

200 {
201  ULONG TunnelEntries;
202  UNICODE_STRING MaximumTunnelEntryAgeInSeconds = RTL_CONSTANT_STRING(L"MaximumTunnelEntryAgeInSeconds");
203  UNICODE_STRING MaximumTunnelEntries = RTL_CONSTANT_STRING( L"MaximumTunnelEntries");
204 
205  /* check for nt */
206  if (MmIsThisAnNtAsSystem())
207  {
208  /* default */
209  TunnelMaxEntries = 1024;
210  }
211 
212  /* check for custom override of max entries*/
213  FsRtlGetTunnelParameterValue(&MaximumTunnelEntries, &TunnelMaxEntries);
214 
215  /* check for custom override of age*/
216  FsRtlGetTunnelParameterValue(&MaximumTunnelEntryAgeInSeconds, &TunnelMaxAge);
217 
218  if (!TunnelMaxAge)
219  {
220  /* no age means no entries */
221  TunnelMaxEntries = 0;
222  }
223 
224  /* get max entries */
225  TunnelEntries = TunnelMaxEntries;
226 
227  /* convert to ticks */
228  TunnelMaxAge *= 10000000;
229 
230  if(TunnelMaxEntries <= 65535)
231  {
232  /* use max 256 entries */
233  TunnelEntries = TunnelMaxEntries / 16;
234  }
235 
236  if(!TunnelEntries && TunnelMaxEntries )
237  {
238  /* max tunnel entries was too small */
239  TunnelEntries = TunnelMaxEntries + 1;
240  }
241 
242  if (TunnelEntries > 0xFFFF)
243  {
244  /* max entries is 256 */
245  TunnelEntries = 256;
246  }
247 
248  /* initialize look aside list */
250 }
VOID NTAPI ExInitializePagedLookasideList(IN PPAGED_LOOKASIDE_LIST Lookaside, IN PALLOCATE_FUNCTION Allocate OPTIONAL, IN PFREE_FUNCTION Free OPTIONAL, IN ULONG Flags, IN SIZE_T Size, IN ULONG Tag, IN USHORT Depth)
Definition: lookas.c:274
smooth NULL
Definition: ftsmooth.c:416
BOOLEAN NTAPI MmIsThisAnNtAsSystem(VOID)
Definition: mmsup.c:246
static const WCHAR L[]
Definition: oid.c:1250
PAGED_LOOKASIDE_LIST TunnelLookasideList
Definition: tunnel.c:30
INIT_FUNCTION VOID FsRtlGetTunnelParameterValue(IN PUNICODE_STRING ParameterName, OUT PULONG Value)
Definition: tunnel.c:134
#define DEFAULT_ENTRY_SIZE
Definition: tunnel.c:33
ULONG TunnelMaxEntries
Definition: tunnel.c:28
unsigned int ULONG
Definition: retypes.h:1
ULONG TunnelMaxAge
Definition: tunnel.c:29
#define RTL_CONSTANT_STRING(s)
Definition: tunneltest.c:14

Referenced by FsRtlInitSystem().

◆ FsRtlInitSystem()

INIT_FUNCTION BOOLEAN NTAPI FsRtlInitSystem ( VOID  )

Definition at line 161 of file fsrtlpc.c.

162 {
163  ULONG i;
164 
165  /* Initialize the list for granted locks */
167  NULL,
168  NULL,
169  0,
170  sizeof(FILE_LOCK),
171  IFS_POOL_TAG,
172  0);
173 
177 
178  /* Allocate the Resource Buffer */
181  sizeof(ERESOURCE),
182  'eRsF');
183 
184  /* Initialize the Resources */
185  for (i = 0; i < FSRTL_MAX_RESOURCES; i++)
186  {
188  }
189 
191 }
#define ExInitializeResource
Definition: exfuncs.h:346
VOID NTAPI ExInitializePagedLookasideList(IN PPAGED_LOOKASIDE_LIST Lookaside, IN PALLOCATE_FUNCTION Allocate OPTIONAL, IN PFREE_FUNCTION Free OPTIONAL, IN ULONG Flags, IN SIZE_T Size, IN ULONG Tag, IN USHORT Depth)
Definition: lookas.c:274
PVOID NTAPI FsRtlAllocatePoolWithTag(IN POOL_TYPE PoolType, IN ULONG NumberOfBytes, IN ULONG Tag)
Definition: filter.c:229
#define MAXLONG
Definition: umtypes.h:116
PAGED_LOOKASIDE_LIST FsRtlFileLockLookasideList
Definition: filelock.c:17
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
INIT_FUNCTION VOID NTAPI FsRtlInitializeLargeMcbs(VOID)
Definition: largemcb.c:478
smooth NULL
Definition: ftsmooth.c:416
#define IFS_POOL_TAG
Definition: tag.h:52
VOID NTAPI KeInitializeSemaphore(IN PKSEMAPHORE Semaphore, IN LONG Count, IN LONG Limit)
Definition: semphobj.c:22
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
KSEMAPHORE FsRtlpUncSemaphore
Definition: unc.c:15
INIT_FUNCTION NTSTATUS NTAPI FsRtlInitializeWorkerThread(VOID)
Definition: stackovf.c:150
#define FSRTL_MAX_RESOURCES
Definition: fsrtl.h:45
INIT_FUNCTION VOID NTAPI FsRtlInitializeTunnels(VOID)
Definition: tunnel.c:199
ULONG ERESOURCE
Definition: env_spec_w32.h:594
unsigned int ULONG
Definition: retypes.h:1
PERESOURCE FsRtlPagingIoResources
Definition: fsrtlpc.c:17

Referenced by Phase1InitializationDiscard().

◆ FsRtlPTeardownPerFileObjectContexts()

VOID NTAPI FsRtlPTeardownPerFileObjectContexts ( IN PFILE_OBJECT  FileObject)

Definition at line 28 of file filtrctx.c.

29 {
31 
33 
34  if (!(FOContext = IoGetFileObjectFilterContext(FileObject)))
35  {
36  return;
37  }
38 
40  ASSERT(IsListEmpty(&(FOContext->FilterContexts)));
41 
42  ExFreePoolWithTag(FOContext, 'FOCX');
43 }
_Must_inspect_result_ FORCEINLINE BOOLEAN IsListEmpty(_In_ const LIST_ENTRY *ListHead)
Definition: rtlfuncs.h:57
smooth NULL
Definition: ftsmooth.c:416
_Inout_ PFILE_OBJECT FileObject
Definition: cdprocs.h:593
PVOID NTAPI IoGetFileObjectFilterContext(IN PFILE_OBJECT FileObject)
Definition: file.c:2495
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
NTSTATUS NTAPI IoChangeFileObjectFilterContext(IN PFILE_OBJECT FileObject, IN PVOID FilterContext, IN BOOLEAN Define)
Definition: file.c:2510
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1099
return STATUS_SUCCESS
Definition: btrfs.c:2966

Referenced by IopDeleteFile().

Variable Documentation

◆ FsRtlFileLockLookasideList

PAGED_LOOKASIDE_LIST FsRtlFileLockLookasideList

Definition at line 17 of file filelock.c.

Referenced by FsRtlAllocateFileLock(), FsRtlFreeFileLock(), and FsRtlInitSystem().

◆ FsRtlPagingIoResources

PERESOURCE FsRtlPagingIoResources

Definition at line 17 of file fsrtlpc.c.

Referenced by FsRtlAllocateResource(), and FsRtlInitSystem().