ReactOS 0.4.16-dev-88-ga65b6ae
cache.c File Reference
#include "btrfs_drv.h"
Include dependency graph for cache.c:

Go to the source code of this file.

Functions

static BOOLEAN __stdcall acquire_for_lazy_write (PVOID Context, BOOLEAN Wait)
 
static void __stdcall release_from_lazy_write (PVOID Context)
 
static BOOLEAN __stdcall acquire_for_read_ahead (PVOID Context, BOOLEAN Wait)
 
static void __stdcall release_from_read_ahead (PVOID Context)
 
void init_cache ()
 

Variables

CACHE_MANAGER_CALLBACKS cache_callbacks
 

Function Documentation

◆ acquire_for_lazy_write()

static BOOLEAN __stdcall acquire_for_lazy_write ( PVOID  Context,
BOOLEAN  Wait 
)
static

Definition at line 22 of file cache.c.

22 {
24 fcb* fcb = FileObject->FsContext;
25
26 TRACE("(%p, %u)\n", Context, Wait);
27
28 if (!ExAcquireResourceSharedLite(&fcb->Vcb->tree_lock, Wait))
29 return false;
30
32 ExReleaseResourceLite(&fcb->Vcb->tree_lock);
33 return false;
34 }
35
37
39
40 return true;
41}
#define ExAcquireResourceExclusiveLite(res, wait)
Definition: env_spec_w32.h:615
#define ExAcquireResourceSharedLite(res, wait)
Definition: env_spec_w32.h:621
#define FSRTL_CACHE_TOP_LEVEL_IRP
Definition: fsrtltypes.h:60
#define KeGetCurrentThread
Definition: hal.h:55
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1822
VOID NTAPI IoSetTopLevelIrp(IN PIRP Irp)
Definition: irp.c:2000
#define TRACE(s)
Definition: solgame.cpp:4
PKTHREAD lazy_writer_thread
Definition: btrfs_drv.h:296
struct _device_extension * Vcb
Definition: btrfs_drv.h:287
FSRTL_ADVANCED_FCB_HEADER Header
Definition: btrfs_drv.h:283
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:550
_In_ WDFDPC _In_ BOOLEAN Wait
Definition: wdfdpc.h:170
* PFILE_OBJECT
Definition: iotypes.h:1998

Referenced by init_cache().

◆ acquire_for_read_ahead()

static BOOLEAN __stdcall acquire_for_read_ahead ( PVOID  Context,
BOOLEAN  Wait 
)
static

Definition at line 59 of file cache.c.

59 {
61 fcb* fcb = FileObject->FsContext;
62
63 TRACE("(%p, %u)\n", Context, Wait);
64
66 return false;
67
69
70 return true;
71}

Referenced by init_cache().

◆ init_cache()

void init_cache ( )

Definition at line 85 of file cache.c.

85 {
90}
static BOOLEAN __stdcall acquire_for_read_ahead(PVOID Context, BOOLEAN Wait)
Definition: cache.c:59
CACHE_MANAGER_CALLBACKS cache_callbacks
Definition: cache.c:20
static BOOLEAN __stdcall acquire_for_lazy_write(PVOID Context, BOOLEAN Wait)
Definition: cache.c:22
static void __stdcall release_from_read_ahead(PVOID Context)
Definition: cache.c:73
static void __stdcall release_from_lazy_write(PVOID Context)
Definition: cache.c:43
PACQUIRE_FOR_LAZY_WRITE AcquireForLazyWrite
Definition: cctypes.h:39
PRELEASE_FROM_LAZY_WRITE ReleaseFromLazyWrite
Definition: cctypes.h:40
PACQUIRE_FOR_READ_AHEAD AcquireForReadAhead
Definition: cctypes.h:41
PRELEASE_FROM_READ_AHEAD ReleaseFromReadAhead
Definition: cctypes.h:42

Referenced by _Function_class_().

◆ release_from_lazy_write()

static void __stdcall release_from_lazy_write ( PVOID  Context)
static

Definition at line 43 of file cache.c.

43 {
45 fcb* fcb = FileObject->FsContext;
46
47 TRACE("(%p)\n", Context);
48
50
52
53 ExReleaseResourceLite(&fcb->Vcb->tree_lock);
54
57}
#define NULL
Definition: types.h:112
PIRP NTAPI IoGetTopLevelIrp(VOID)
Definition: irp.c:1843

Referenced by init_cache().

◆ release_from_read_ahead()

static void __stdcall release_from_read_ahead ( PVOID  Context)
static

Definition at line 73 of file cache.c.

73 {
75 fcb* fcb = FileObject->FsContext;
76
77 TRACE("(%p)\n", Context);
78
80
83}

Referenced by init_cache().

Variable Documentation

◆ cache_callbacks

CACHE_MANAGER_CALLBACKS cache_callbacks

Definition at line 20 of file cache.c.

Referenced by init_cache(), init_file_cache(), and mount_vol().