ReactOS 0.4.15-dev-5666-gc548b97
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 1692 of file fastio.c.

1693{
1694 PFSRTL_COMMON_FCB_HEADER FcbHeader;
1695 PDEVICE_OBJECT DeviceObject, BaseDeviceObject;
1696 PFAST_IO_DISPATCH FastDispatch;
1698
1699 /* Get the Base File System (Volume) and Fast Calls */
1700 FcbHeader = (PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext;
1702 BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject);
1703 FastDispatch = DeviceObject->DriverObject->FastIoDispatch;
1704
1705 /* Get master FsRtl lock */
1707
1708 /* Check if Fast Calls are supported, and check AcquireForCcFlush */
1709 if (FastDispatch &&
1710 FastDispatch->AcquireForCcFlush)
1711 {
1712 /* Call the AcquireForCcFlush FastIo handler */
1713 Status = FastDispatch->AcquireForCcFlush(FileObject, BaseDeviceObject);
1714
1715 /* Return either success or inability to wait.
1716 In case of other failure - fall through */
1717 if (NT_SUCCESS(Status))
1718 return Status;
1719
1720 if (Status == STATUS_CANT_WAIT)
1721 {
1722 DPRINT1("STATUS_CANT_WAIT\n");
1724 return Status;
1725 }
1726 }
1727
1728 /* No FastIo handler (or it failed). Acquire Main resource */
1729 if (FcbHeader->Resource)
1730 {
1731 /* Acquire it - either shared if it's already acquired
1732 or exclusively if we are the first */
1735 else
1737 }
1738
1739 /* Also acquire its PagingIO resource */
1740 if (FcbHeader->PagingIoResource)
1742
1743 return STATUS_SUCCESS;
1744}
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:32
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:1658
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 1852 of file fastio.c.

1855{
1856 PFSRTL_COMMON_FCB_HEADER FcbHeader;
1857 PDEVICE_OBJECT DeviceObject, BaseDeviceObject;
1858 PFAST_IO_DISPATCH FastDispatch;
1859 PERESOURCE ResourceToAcquire = NULL;
1863
1864 /* Get Device Object and Fast Calls */
1865 FcbHeader = (PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext;
1867 BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject);
1868 FastDispatch = DeviceObject->DriverObject->FastIoDispatch;
1869
1870 /* Check if Fast Calls are supported, and check AcquireForModWrite */
1871 if (FastDispatch &&
1872 FastDispatch->AcquireForModWrite)
1873 {
1874 /* Call the AcquireForModWrite FastIo handler */
1875 Status = FastDispatch->AcquireForModWrite(FileObject,
1878 BaseDeviceObject);
1879
1880 /* Return either success or inability to wait.
1881 In case of other failure - fall through */
1882 if (Status == STATUS_SUCCESS ||
1884 {
1885 return Status;
1886 }
1887 }
1888
1889 /* Check what and how we should acquire */
1890 Exclusive = FsRtlpGetResourceForModWrite(FcbHeader, EndingOffset, &ResourceToAcquire);
1891
1892 /* Acquire the resource and loop until we're sure we got this right. */
1893 while (TRUE)
1894 {
1895 BOOLEAN OldExclusive;
1896 PERESOURCE OldResourceToAcquire;
1897
1898 if (ResourceToAcquire == NULL)
1899 {
1900 /*
1901 * There's nothing to acquire, we can simply return success
1902 */
1903
1904 break;
1905 }
1906
1907 if (Exclusive)
1908 {
1909 Result = ExAcquireResourceExclusiveLite(ResourceToAcquire, FALSE);
1910 }
1911 else
1912 {
1913 Result = ExAcquireSharedWaitForExclusive(ResourceToAcquire, FALSE);
1914 }
1915
1916 if (!Result)
1917 {
1918 return STATUS_CANT_WAIT;
1919 }
1920
1921 /* Does this still hold true? */
1922 OldExclusive = Exclusive;
1923 OldResourceToAcquire = ResourceToAcquire;
1924 Exclusive = FsRtlpGetResourceForModWrite(FcbHeader, EndingOffset, &ResourceToAcquire);
1925
1926 if ((OldExclusive == Exclusive) && (OldResourceToAcquire == ResourceToAcquire))
1927 {
1928 /* We're good */
1929 break;
1930 }
1931
1932 /* Can we fix this situation? */
1933 if ((OldResourceToAcquire == ResourceToAcquire) && !Exclusive)
1934 {
1935 /* We can easily do so */
1936 ExConvertExclusiveToSharedLite(ResourceToAcquire);
1937 break;
1938 }
1939
1940 /* Things have changed since we acquired the lock. Start again */
1941 ExReleaseResourceLite(OldResourceToAcquire);
1942 }
1943
1944 /* If we're here, this means that we succeeded */
1945 *ResourceToRelease = ResourceToAcquire;
1946 return STATUS_SUCCESS;
1947}
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:1217
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1817
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:1809
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:426
_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 1647 of file fastio.c.

1649{
1650 PAGED_CODE();
1651
1653}
#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}
unsigned int ULONG
Definition: retypes.h:1
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

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:1099
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 1765 of file fastio.c.

1766{
1767 PFSRTL_COMMON_FCB_HEADER FcbHeader;
1768 PDEVICE_OBJECT DeviceObject, BaseDeviceObject;
1769 PFAST_IO_DISPATCH FastDispatch;
1771
1772 /* Get Device Object and Fast Calls */
1773 FcbHeader = (PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext;
1775 BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject);
1776 FastDispatch = DeviceObject->DriverObject->FastIoDispatch;
1777
1778 /* Check if Fast Calls are supported, and check ReleaseForCcFlush */
1779 if (FastDispatch &&
1780 FastDispatch->ReleaseForCcFlush)
1781 {
1782 /* Call the ReleaseForCcFlush FastIo handler */
1783 Status = FastDispatch->ReleaseForCcFlush(FileObject, BaseDeviceObject);
1784 }
1785
1786 if (!NT_SUCCESS(Status))
1787 {
1788 /* No FastIo handler (or it failed). Release PagingIO resource and
1789 then Main resource */
1790 if (FcbHeader->PagingIoResource) ExReleaseResourceLite(FcbHeader->PagingIoResource);
1791 if (FcbHeader->Resource) ExReleaseResourceLite(FcbHeader->Resource);
1792 }
1793
1794 /* Release master FsRtl lock */
1796}
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().