ReactOS 0.4.15-dev-5669-g09dde2c
cmcb.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYRIGHT.TXT
3 * PROJECT: Ext2 File System Driver for WinNT/2K/XP
4 * FILE: cmcb.c
5 * PROGRAMMER: Matt Wu <mattwu@163.com>
6 * HOMEPAGE: http://www.ext2fsd.com
7 * UPDATE HISTORY:
8 */
9
10/* INCLUDES *****************************************************************/
11
12#include "ext2fs.h"
13
14/* GLOBALS ***************************************************************/
15
17
18/* DEFINITIONS *************************************************************/
19
20#define CMCB_DEBUG_LEVEL DL_NVR
21
26{
27 //
28 // On a readonly filesystem this function still has to exist but it
29 // doesn't need to do anything.
30
32
34 ASSERT(Fcb != NULL);
36 (Fcb->Identifier.Size == sizeof(EXT2_FCB)));
37#if EXT2_DEBUG
38 DEBUG(CMCB_DEBUG_LEVEL, ("Ext2AcquireForLazyWrite: %s %s Fcb=%p\n",
39 Ext2GetCurrentProcessName(), "ACQUIRE_FOR_LAZY_WRITE", Fcb));
40#endif
42 return FALSE;
43 }
44
45 ASSERT(Fcb->LazyWriterThread == NULL);
46 Fcb->LazyWriterThread = PsGetCurrentThread();
47
50
51 return TRUE;
52}
53
56{
57 //
58 // On a readonly filesystem this function still has to exist but it
59 // doesn't need to do anything.
61
62 ASSERT(Fcb != NULL);
63
65 (Fcb->Identifier.Size == sizeof(EXT2_FCB)));
66#if EXT2_DEBUG
67 DEBUG(CMCB_DEBUG_LEVEL, ( "Ext2ReleaseFromLazyWrite: %s %s Fcb=%p\n",
68 Ext2GetCurrentProcessName(), "RELEASE_FROM_LAZY_WRITE", Fcb));
69#endif
70 ASSERT(Fcb->LazyWriterThread == PsGetCurrentThread());
71 Fcb->LazyWriterThread = NULL;
72
74
77}
78
82{
84
85 ASSERT(Fcb != NULL);
87 (Fcb->Identifier.Size == sizeof(EXT2_FCB)));
88
89 DEBUG(CMCB_DEBUG_LEVEL, ("Ext2AcquireForReadAhead: i=%xh Fcb=%p\n",
90 Fcb->Mcb->Inode.i_ino, Fcb));
91
93 return FALSE;
96
97 return TRUE;
98}
99
102{
104
105 ASSERT(Fcb != NULL);
106
108 (Fcb->Identifier.Size == sizeof(EXT2_FCB)));
109
110 DEBUG(CMCB_DEBUG_LEVEL, ("Ext2ReleaseFromReadAhead: i=%xh Fcb=%p\n",
111 Fcb->Mcb->Inode.i_ino, Fcb));
112
115}
116
119 IN PVOID Fcb,
121)
122{
125 return TRUE;
126}
127
130 IN PVOID Fcb
131)
132{
135
136 return;
137}
138
unsigned char BOOLEAN
#define DEBUG(args)
Definition: rdesktop.h:129
_In_ PFCB Fcb
Definition: cdprocs.h:159
#define CMCB_DEBUG_LEVEL
Definition: cmcb.c:20
PEXT2_GLOBAL Ext2Global
Definition: init.c:16
VOID NTAPI Ext2ReleaseFromLazyWrite(IN PVOID Context)
Definition: cmcb.c:55
BOOLEAN NTAPI Ext2AcquireForLazyWrite(IN PVOID Context, IN BOOLEAN Wait)
Definition: cmcb.c:23
VOID NTAPI Ext2ReleaseFromReadAhead(IN PVOID Context)
Definition: cmcb.c:101
BOOLEAN NTAPI Ext2NoOpAcquire(IN PVOID Fcb, IN BOOLEAN Wait)
Definition: cmcb.c:118
VOID NTAPI Ext2NoOpRelease(IN PVOID Fcb)
Definition: cmcb.c:129
BOOLEAN NTAPI Ext2AcquireForReadAhead(IN PVOID Context, IN BOOLEAN Wait)
Definition: cmcb.c:80
#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 ExAcquireResourceSharedLite(res, wait)
Definition: env_spec_w32.h:621
#define Ext2GetCurrentProcessName()
Definition: ext2fs.h:1452
@ EXT2FCB
Definition: ext2fs.h:458
struct _EXT2_FCB * PEXT2_FCB
#define FSRTL_CACHE_TOP_LEVEL_IRP
Definition: fsrtltypes.h:60
#define ASSERT(a)
Definition: mode.c:44
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1817
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
CD_MCB Mcb
Definition: cdstruc.h:1016
NTFSIDENTIFIER Identifier
Definition: ntfs.h:515
FSRTL_ADVANCED_FCB_HEADER Header
Definition: cdstruc.h:925
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
_In_ WDFDPC _In_ BOOLEAN Wait
Definition: wdfdpc.h:170