ReactOS 0.4.16-dev-297-gc569aee
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
22#ifdef __REACTOS__
24#else
26#endif
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}
57
58#ifdef __REACTOS__
60#else
61VOID
62#endif
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}
86
87#ifdef __REACTOS__
89#else
91#endif
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}
111
112#ifdef __REACTOS__
114#else
115VOID
116#endif
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}
132
133#ifdef __REACTOS__
135#else
137#endif
139 IN PVOID Fcb,
141)
142{
145 return TRUE;
146}
147
148#ifdef __REACTOS__
150#else
151VOID
152#endif
154 IN PVOID Fcb
155)
156{
159
160 return;
161}
162
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
BOOLEAN Ext2AcquireForLazyWrite(IN PVOID Context, IN BOOLEAN Wait)
Definition: cmcb.c:27
PEXT2_GLOBAL Ext2Global
Definition: init.c:16
VOID Ext2ReleaseFromLazyWrite(IN PVOID Context)
Definition: cmcb.c:63
BOOLEAN Ext2NoOpAcquire(IN PVOID Fcb, IN BOOLEAN Wait)
Definition: cmcb.c:138
BOOLEAN Ext2AcquireForReadAhead(IN PVOID Context, IN BOOLEAN Wait)
Definition: cmcb.c:92
VOID Ext2ReleaseFromReadAhead(IN PVOID Context)
Definition: cmcb.c:117
VOID Ext2NoOpRelease(IN PVOID Fcb)
Definition: cmcb.c:153
#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: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
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1822
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