ReactOS 0.4.16-dev-297-gc569aee
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

VOID NTAPI FsRtlInitializeLargeMcbs (VOID)
 
VOID NTAPI FsRtlInitializeTunnels (VOID)
 
VOID NTAPI FsRtlPTeardownPerFileObjectContexts (IN PFILE_OBJECT FileObject)
 
BOOLEAN NTAPI FsRtlInitSystem (VOID)
 
NTSTATUS NTAPI FsRtlAcquireToCreateMappedSection (_In_ PFILE_OBJECT FileObject, _In_ ULONG SectionPageProtection)
 
VOID NTAPI FsRtlReleaseFileForCcFlush (IN PFILE_OBJECT FileObject)
 
NTSTATUS NTAPI FsRtlAcquireFileForCcFlushEx (IN PFILE_OBJECT FileObject)
 
_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)
 
VOID NTAPI FsRtlReleaseFileForModWrite (IN PFILE_OBJECT FileObject, IN PERESOURCE ResourceToRelease)
 

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

◆ FsRtlAcquireFileForCcFlushEx()

NTSTATUS NTAPI FsRtlAcquireFileForCcFlushEx ( IN PFILE_OBJECT  FileObject)

Definition at line 1698 of file fastio.c.

1699{
1700 PFSRTL_COMMON_FCB_HEADER FcbHeader;
1701 PDEVICE_OBJECT DeviceObject, BaseDeviceObject;
1702 PFAST_IO_DISPATCH FastDispatch;
1704
1705 /* Get the Base File System (Volume) and Fast Calls */
1706 FcbHeader = (PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext;
1708 BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject);
1709 FastDispatch = DeviceObject->DriverObject->FastIoDispatch;
1710
1711 /* Get master FsRtl lock */
1713
1714 /* Check if Fast Calls are supported, and check AcquireForCcFlush */
1715 if (FastDispatch &&
1716 FastDispatch->AcquireForCcFlush)
1717 {
1718 /* Call the AcquireForCcFlush FastIo handler */
1719 Status = FastDispatch->AcquireForCcFlush(FileObject, BaseDeviceObject);
1720
1721 /* Return either success or inability to wait.
1722 In case of other failure - fall through */
1723 if (NT_SUCCESS(Status))
1724 return Status;
1725
1726 if (Status == STATUS_CANT_WAIT)
1727 {
1728 DPRINT1("STATUS_CANT_WAIT\n");
1730 return Status;
1731 }
1732 }
1733
1734 /* No FastIo handler (or it failed). Acquire Main resource */
1735 if (FcbHeader->Resource)
1736 {
1737 /* Acquire it - either shared if it's already acquired
1738 or exclusively if we are the first */
1741 else
1743 }
1744
1745 /* Also acquire its PagingIO resource */
1746 if (FcbHeader->PagingIoResource)
1748
1749 return STATUS_SUCCESS;
1750}
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
#define TRUE
Definition: types.h:120
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
struct _FSRTL_COMMON_FCB_HEADER * PFSRTL_COMMON_FCB_HEADER
#define ExAcquireResourceExclusiveLite(res, wait)
Definition: env_spec_w32.h:615
#define ExAcquireResourceSharedLite(res, wait)
Definition: env_spec_w32.h:621
#define FsRtlEnterFileSystem
#define FsRtlExitFileSystem
Status
Definition: gdiplustypes.h:25
ULONG NTAPI ExIsResourceAcquiredSharedLite(IN PERESOURCE Resource)
Definition: resource.c:1663
PDEVICE_OBJECT NTAPI IoGetRelatedDeviceObject(IN PFILE_OBJECT FileObject)
Definition: device.c:1539
PDEVICE_OBJECT NTAPI IoGetBaseFileSystemDeviceObject(IN PFILE_OBJECT FileObject)
Definition: device.c:1627
#define STATUS_CANT_WAIT
Definition: ntstatus.h:452
#define STATUS_SUCCESS
Definition: shellext.h:65
PFAST_IO_ACQUIRE_FOR_CCFLUSH AcquireForCcFlush
Definition: iotypes.h:1759
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:550

Referenced by CcRosFlushVacb(), and FsRtlAcquireFileForCcFlush().

◆ FsRtlAcquireFileForModWriteEx()

_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)

Parameters
FileObject- The file object to lock
EndingOffset- The end offset of the write to be done
ResourceToRelease- Pointer receiving the resource to release after the write
Returns
Relevant NTSTATUS value

Definition at line 1858 of file fastio.c.

1861{
1862 PFSRTL_COMMON_FCB_HEADER FcbHeader;
1863 PDEVICE_OBJECT DeviceObject, BaseDeviceObject;
1864 PFAST_IO_DISPATCH FastDispatch;
1865 PERESOURCE ResourceToAcquire = NULL;
1869
1870 /* Get Device Object and Fast Calls */
1871 FcbHeader = (PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext;
1873 BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject);
1874 FastDispatch = DeviceObject->DriverObject->FastIoDispatch;
1875
1876 /* Check if Fast Calls are supported, and check AcquireForModWrite */
1877 if (FastDispatch &&
1878 FastDispatch->AcquireForModWrite)
1879 {
1880 /* Call the AcquireForModWrite FastIo handler */
1881 Status = FastDispatch->AcquireForModWrite(FileObject,
1884 BaseDeviceObject);
1885
1886 /* Return either success or inability to wait.
1887 In case of other failure - fall through */
1888 if (Status == STATUS_SUCCESS ||
1890 {
1891 return Status;
1892 }
1893 }
1894
1895 /* Check what and how we should acquire */
1896 Exclusive = FsRtlpGetResourceForModWrite(FcbHeader, EndingOffset, &ResourceToAcquire);
1897
1898 /* Acquire the resource and loop until we're sure we got this right. */
1899 while (TRUE)
1900 {
1901 BOOLEAN OldExclusive;
1902 PERESOURCE OldResourceToAcquire;
1903
1904 if (ResourceToAcquire == NULL)
1905 {
1906 /*
1907 * There's nothing to acquire, we can simply return success
1908 */
1909
1910 break;
1911 }
1912
1913 if (Exclusive)
1914 {
1915 Result = ExAcquireResourceExclusiveLite(ResourceToAcquire, FALSE);
1916 }
1917 else
1918 {
1919 Result = ExAcquireSharedWaitForExclusive(ResourceToAcquire, FALSE);
1920 }
1921
1922 if (!Result)
1923 {
1924 return STATUS_CANT_WAIT;
1925 }
1926
1927 /* Does this still hold true? */
1928 OldExclusive = Exclusive;
1929 OldResourceToAcquire = ResourceToAcquire;
1930 Exclusive = FsRtlpGetResourceForModWrite(FcbHeader, EndingOffset, &ResourceToAcquire);
1931
1932 if ((OldExclusive == Exclusive) && (OldResourceToAcquire == ResourceToAcquire))
1933 {
1934 /* We're good */
1935 break;
1936 }
1937
1938 /* Can we fix this situation? */
1939 if ((OldResourceToAcquire == ResourceToAcquire) && !Exclusive)
1940 {
1941 /* We can easily do so */
1942 ExConvertExclusiveToSharedLite(ResourceToAcquire);
1943 break;
1944 }
1945
1946 /* Things have changed since we acquired the lock. Start again */
1947 ExReleaseResourceLite(OldResourceToAcquire);
1948 }
1949
1950 /* If we're here, this means that we succeeded */
1951 *ResourceToRelease = ResourceToAcquire;
1952 return STATUS_SUCCESS;
1953}
unsigned char BOOLEAN
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define ExConvertExclusiveToSharedLite(res)
Definition: env_spec_w32.h:652
ERESOURCE * PERESOURCE
Definition: env_spec_w32.h:595
__in PWDFDEVICE_INIT __in BOOLEAN Exclusive
BOOLEAN NTAPI ExAcquireSharedWaitForExclusive(IN PERESOURCE Resource, IN BOOLEAN Wait)
Definition: resource.c:1222
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1822
static BOOLEAN FsRtlpGetResourceForModWrite(_In_ PFSRTL_COMMON_FCB_HEADER FcbHeader, _In_ PLARGE_INTEGER EndingOffset, _Outptr_result_maybenull_ PERESOURCE *ResourceToAcquire)
Get the resource to acquire when Mod Writer flushes data to disk.
Definition: fastio.c:1815
PFAST_IO_ACQUIRE_FOR_MOD_WRITE AcquireForModWrite
Definition: iotypes.h:1748
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
_In_ PLARGE_INTEGER _Out_ struct _ERESOURCE ** ResourceToRelease
Definition: iotypes.h:1598
_In_ PLARGE_INTEGER EndingOffset
Definition: iotypes.h:1597

◆ FsRtlAcquireToCreateMappedSection()

NTSTATUS NTAPI FsRtlAcquireToCreateMappedSection ( _In_ PFILE_OBJECT  FileObject,
_In_ ULONG  SectionPageProtection 
)

Definition at line 1653 of file fastio.c.

1655{
1656 PAGED_CODE();
1657
1659}
#define PAGED_CODE()
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_opt_ PLARGE_INTEGER _In_ ULONG SectionPageProtection
Definition: mmfuncs.h:363
NTSTATUS NTAPI FsRtlAcquireFileExclusiveCommon(IN PFILE_OBJECT FileObject, IN FS_FILTER_SECTION_SYNC_TYPE SyncType, IN ULONG Reserved)
Definition: fastio.c:1557
@ SyncTypeCreateSection
Definition: iotypes.h:7365

Referenced by MmCreateArm3Section(), and MmCreateSection().

◆ FsRtlInitializeLargeMcbs()

VOID NTAPI FsRtlInitializeLargeMcbs ( VOID  )

Definition at line 479 of file largemcb.c.

480{
481 /* Initialize the list for the MCB */
483 NULL,
484 NULL,
486 sizeof(LARGE_MCB_MAPPING),
488 0); /* FIXME: Should be 4 */
489
490 /* Initialize the list for the guarded mutex */
492 NULL,
493 NULL,
495 sizeof(KGUARDED_MUTEX),
497 0); /* FIXME: Should be 32 */
498}
NPAGED_LOOKASIDE_LIST FsRtlFastMutexLookasideList
Definition: largemcb.c:23
PAGED_LOOKASIDE_LIST FsRtlFirstMappingLookasideList
Definition: largemcb.c:22
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:270
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:218
#define IFS_POOL_TAG
Definition: tag.h:67
#define POOL_RAISE_IF_ALLOCATION_FAILURE

Referenced by FsRtlInitSystem().

◆ FsRtlInitializeTunnels()

VOID NTAPI FsRtlInitializeTunnels ( VOID  )

Definition at line 200 of file tunnel.c.

201{
202 ULONG TunnelEntries;
203 UNICODE_STRING MaximumTunnelEntryAgeInSeconds = RTL_CONSTANT_STRING(L"MaximumTunnelEntryAgeInSeconds");
204 UNICODE_STRING MaximumTunnelEntries = RTL_CONSTANT_STRING( L"MaximumTunnelEntries");
205
206 /* check for nt */
208 {
209 /* default */
210 TunnelMaxEntries = 1024;
211 }
212
213 /* check for custom override of max entries*/
214 FsRtlGetTunnelParameterValue(&MaximumTunnelEntries, &TunnelMaxEntries);
215
216 /* check for custom override of age*/
217 FsRtlGetTunnelParameterValue(&MaximumTunnelEntryAgeInSeconds, &TunnelMaxAge);
218
219 if (!TunnelMaxAge)
220 {
221 /* no age means no entries */
223 }
224
225 /* get max entries */
226 TunnelEntries = TunnelMaxEntries;
227
228 /* convert to ticks */
229 TunnelMaxAge *= 10000000;
230
231 if(TunnelMaxEntries <= 65535)
232 {
233 /* use max 256 entries */
234 TunnelEntries = TunnelMaxEntries / 16;
235 }
236
237 if(!TunnelEntries && TunnelMaxEntries )
238 {
239 /* max tunnel entries was too small */
240 TunnelEntries = TunnelMaxEntries + 1;
241 }
242
243 if (TunnelEntries > 0xFFFF)
244 {
245 /* max entries is 256 */
246 TunnelEntries = 256;
247 }
248
249 /* initialize look aside list */
251}
BOOLEAN NTAPI MmIsThisAnNtAsSystem(VOID)
Definition: mmsup.c:246
#define L(x)
Definition: ntvdm.h:50
#define DEFAULT_ENTRY_SIZE
Definition: tunnel.c:33
ULONG TunnelMaxEntries
Definition: tunnel.c:28
ULONG TunnelMaxAge
Definition: tunnel.c:29
VOID FsRtlGetTunnelParameterValue(IN PUNICODE_STRING ParameterName, OUT PULONG Value)
Definition: tunnel.c:135
PAGED_LOOKASIDE_LIST TunnelLookasideList
Definition: tunnel.c:30
#define RTL_CONSTANT_STRING(s)
Definition: tunneltest.c:14
uint32_t ULONG
Definition: typedefs.h:59

Referenced by FsRtlInitSystem().

◆ FsRtlInitSystem()

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),
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 NonPagedPool
Definition: env_spec_w32.h:307
ULONG ERESOURCE
Definition: env_spec_w32.h:594
PAGED_LOOKASIDE_LIST FsRtlFileLockLookasideList
Definition: filelock.c:17
#define FSRTL_MAX_RESOURCES
Definition: fsrtl.h:45
PERESOURCE FsRtlPagingIoResources
Definition: fsrtlpc.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
VOID NTAPI FsRtlInitializeLargeMcbs(VOID)
Definition: largemcb.c:479
PVOID NTAPI FsRtlAllocatePoolWithTag(IN POOL_TYPE PoolType, IN ULONG NumberOfBytes, IN ULONG Tag)
Definition: filter.c:229
VOID NTAPI KeInitializeSemaphore(IN PKSEMAPHORE Semaphore, IN LONG Count, IN LONG Limit)
Definition: semphobj.c:22
NTSTATUS NTAPI FsRtlInitializeWorkerThread(VOID)
Definition: stackovf.c:150
VOID NTAPI FsRtlInitializeTunnels(VOID)
Definition: tunnel.c:200
#define MAXLONG
Definition: umtypes.h:116
KSEMAPHORE FsRtlpUncSemaphore
Definition: unc.c:15
#define ExInitializeResource
Definition: exfuncs.h:346

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}
#define IsListEmpty(ListHead)
Definition: env_spec_w32.h:954
#define ASSERT(a)
Definition: mode.c:44
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
NTSTATUS NTAPI IoChangeFileObjectFilterContext(IN PFILE_OBJECT FileObject, IN PVOID FilterContext, IN BOOLEAN Define)
Definition: file.c:2511
PVOID NTAPI IoGetFileObjectFilterContext(IN PFILE_OBJECT FileObject)
Definition: file.c:2496

Referenced by IopDeleteFile().

◆ FsRtlReleaseFileForCcFlush()

VOID NTAPI FsRtlReleaseFileForCcFlush ( IN PFILE_OBJECT  FileObject)

Definition at line 1771 of file fastio.c.

1772{
1773 PFSRTL_COMMON_FCB_HEADER FcbHeader;
1774 PDEVICE_OBJECT DeviceObject, BaseDeviceObject;
1775 PFAST_IO_DISPATCH FastDispatch;
1777
1778 /* Get Device Object and Fast Calls */
1779 FcbHeader = (PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext;
1781 BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject);
1782 FastDispatch = DeviceObject->DriverObject->FastIoDispatch;
1783
1784 /* Check if Fast Calls are supported, and check ReleaseForCcFlush */
1785 if (FastDispatch &&
1786 FastDispatch->ReleaseForCcFlush)
1787 {
1788 /* Call the ReleaseForCcFlush FastIo handler */
1789 Status = FastDispatch->ReleaseForCcFlush(FileObject, BaseDeviceObject);
1790 }
1791
1792 if (!NT_SUCCESS(Status))
1793 {
1794 /* No FastIo handler (or it failed). Release PagingIO resource and
1795 then Main resource */
1796 if (FcbHeader->PagingIoResource) ExReleaseResourceLite(FcbHeader->PagingIoResource);
1797 if (FcbHeader->Resource) ExReleaseResourceLite(FcbHeader->Resource);
1798 }
1799
1800 /* Release master FsRtl lock */
1802}
PFAST_IO_RELEASE_FOR_CCFLUSH ReleaseForCcFlush
Definition: iotypes.h:1760
#define STATUS_INVALID_DEVICE_REQUEST
Definition: udferr_usr.h:138

Referenced by CcRosFlushVacb().

◆ FsRtlReleaseFileForModWrite()

VOID NTAPI FsRtlReleaseFileForModWrite ( IN PFILE_OBJECT  FileObject,
IN PERESOURCE  ResourceToRelease 
)

Variable Documentation

◆ FsRtlFileLockLookasideList

PAGED_LOOKASIDE_LIST FsRtlFileLockLookasideList
extern

Definition at line 17 of file filelock.c.

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

◆ FsRtlPagingIoResources

PERESOURCE FsRtlPagingIoResources
extern

Definition at line 17 of file fsrtlpc.c.

Referenced by FsRtlAllocateResource(), and FsRtlInitSystem().