ReactOS 0.4.16-dev-297-gc569aee
cmcb.c File Reference
#include "ext2fs.h"
Include dependency graph for cmcb.c:

Go to the source code of this file.

Macros

#define CMCB_DEBUG_LEVEL   DL_NVR
 

Functions

BOOLEAN Ext2AcquireForLazyWrite (IN PVOID Context, IN BOOLEAN Wait)
 
VOID Ext2ReleaseFromLazyWrite (IN PVOID Context)
 
BOOLEAN Ext2AcquireForReadAhead (IN PVOID Context, IN BOOLEAN Wait)
 
VOID Ext2ReleaseFromReadAhead (IN PVOID Context)
 
BOOLEAN Ext2NoOpAcquire (IN PVOID Fcb, IN BOOLEAN Wait)
 
VOID Ext2NoOpRelease (IN PVOID Fcb)
 

Variables

PEXT2_GLOBAL Ext2Global
 

Macro Definition Documentation

◆ CMCB_DEBUG_LEVEL

#define CMCB_DEBUG_LEVEL   DL_NVR

Definition at line 20 of file cmcb.c.

Function Documentation

◆ Ext2AcquireForLazyWrite()

BOOLEAN Ext2AcquireForLazyWrite ( IN PVOID  Context,
IN BOOLEAN  Wait 
)

Definition at line 27 of file cmcb.c.

30{
31 //
32 // On a readonly filesystem this function still has to exist but it
33 // doesn't need to do anything.
34
36
38 ASSERT(Fcb != NULL);
40 (Fcb->Identifier.Size == sizeof(EXT2_FCB)));
41#if EXT2_DEBUG
42 DEBUG(CMCB_DEBUG_LEVEL, ("Ext2AcquireForLazyWrite: %s %s Fcb=%p\n",
43 Ext2GetCurrentProcessName(), "ACQUIRE_FOR_LAZY_WRITE", Fcb));
44#endif
46 return FALSE;
47 }
48
49 ASSERT(Fcb->LazyWriterThread == NULL);
50 Fcb->LazyWriterThread = PsGetCurrentThread();
51
54
55 return TRUE;
56}
#define DEBUG(args)
Definition: rdesktop.h:129
_In_ PFCB Fcb
Definition: cdprocs.h:159
#define CMCB_DEBUG_LEVEL
Definition: cmcb.c:20
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define PsGetCurrentThread()
Definition: env_spec_w32.h:81
#define ExAcquireResourceExclusiveLite(res, wait)
Definition: env_spec_w32.h:615
#define Ext2GetCurrentProcessName()
Definition: ext2fs.h:1489
@ EXT2FCB
Definition: ext2fs.h:463
struct _EXT2_FCB * PEXT2_FCB
#define FSRTL_CACHE_TOP_LEVEL_IRP
Definition: fsrtltypes.h:60
#define ASSERT(a)
Definition: mode.c:44
PIRP NTAPI IoGetTopLevelIrp(VOID)
Definition: irp.c:1843
VOID NTAPI IoSetTopLevelIrp(IN PIRP Irp)
Definition: irp.c:2000
ULONG Type
Definition: ntfs.h:95
ULONG Size
Definition: ntfs.h:96
NTFSIDENTIFIER Identifier
Definition: ntfs.h:515
FSRTL_ADVANCED_FCB_HEADER Header
Definition: cdstruc.h:925
_In_ WDFDPC _In_ BOOLEAN Wait
Definition: wdfdpc.h:170

Referenced by DriverEntry().

◆ Ext2AcquireForReadAhead()

BOOLEAN Ext2AcquireForReadAhead ( IN PVOID  Context,
IN BOOLEAN  Wait 
)

Definition at line 92 of file cmcb.c.

94{
96
97 ASSERT(Fcb != NULL);
99 (Fcb->Identifier.Size == sizeof(EXT2_FCB)));
100
101 DEBUG(CMCB_DEBUG_LEVEL, ("Ext2AcquireForReadAhead: i=%xh Fcb=%p\n",
102 Fcb->Mcb->Inode.i_ino, Fcb));
103
105 return FALSE;
108
109 return TRUE;
110}
#define ExAcquireResourceSharedLite(res, wait)
Definition: env_spec_w32.h:621
CD_MCB Mcb
Definition: cdstruc.h:1016

Referenced by DriverEntry().

◆ Ext2NoOpAcquire()

BOOLEAN Ext2NoOpAcquire ( IN PVOID  Fcb,
IN BOOLEAN  Wait 
)

Definition at line 138 of file cmcb.c.

Referenced by DriverEntry().

◆ Ext2NoOpRelease()

VOID Ext2NoOpRelease ( IN PVOID  Fcb)

Definition at line 153 of file cmcb.c.

156{
159
160 return;
161}

Referenced by DriverEntry().

◆ Ext2ReleaseFromLazyWrite()

VOID Ext2ReleaseFromLazyWrite ( IN PVOID  Context)

Definition at line 63 of file cmcb.c.

64{
65 //
66 // On a readonly filesystem this function still has to exist but it
67 // doesn't need to do anything.
69
70 ASSERT(Fcb != NULL);
71
73 (Fcb->Identifier.Size == sizeof(EXT2_FCB)));
74#if EXT2_DEBUG
75 DEBUG(CMCB_DEBUG_LEVEL, ( "Ext2ReleaseFromLazyWrite: %s %s Fcb=%p\n",
76 Ext2GetCurrentProcessName(), "RELEASE_FROM_LAZY_WRITE", Fcb));
77#endif
78 ASSERT(Fcb->LazyWriterThread == PsGetCurrentThread());
79 Fcb->LazyWriterThread = NULL;
80
82
85}
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1822

Referenced by DriverEntry().

◆ Ext2ReleaseFromReadAhead()

VOID Ext2ReleaseFromReadAhead ( IN PVOID  Context)

Definition at line 117 of file cmcb.c.

118{
120
121 ASSERT(Fcb != NULL);
122
124 (Fcb->Identifier.Size == sizeof(EXT2_FCB)));
125
126 DEBUG(CMCB_DEBUG_LEVEL, ("Ext2ReleaseFromReadAhead: i=%xh Fcb=%p\n",
127 Fcb->Mcb->Inode.i_ino, Fcb));
128
131}

Referenced by DriverEntry().

Variable Documentation

◆ Ext2Global

PEXT2_GLOBAL Ext2Global
extern

Definition at line 16 of file init.c.