ReactOS  0.4.14-dev-614-gbfd8a84
pin.c File Reference
#include <ntoskrnl.h>
#include <debug.h>
Include dependency graph for pin.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

static PINTERNAL_BCB NTAPI CcpFindBcb (IN PROS_SHARED_CACHE_MAP SharedCacheMap, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Pinned)
 
static BOOLEAN NTAPI CcpMapData (IN PROS_SHARED_CACHE_MAP SharedCacheMap, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PROS_VACB *pVacb, OUT PVOID *pBuffer)
 
static VOID CcpDereferenceBcb (IN PROS_SHARED_CACHE_MAP SharedCacheMap, IN PINTERNAL_BCB Bcb)
 
static PVOID CcpGetAppropriateBcb (IN PROS_SHARED_CACHE_MAP SharedCacheMap, IN PROS_VACB Vacb, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG PinFlags, IN BOOLEAN ToPin)
 
static BOOLEAN CcpPinData (IN PROS_SHARED_CACHE_MAP SharedCacheMap, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PVOID *Bcb, OUT PVOID *Buffer)
 
BOOLEAN NTAPI CcMapData (IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PVOID *pBcb, OUT PVOID *pBuffer)
 
BOOLEAN NTAPI CcPinMappedData (IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PVOID *Bcb)
 
BOOLEAN NTAPI CcPinRead (IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PVOID *Bcb, OUT PVOID *Buffer)
 
BOOLEAN NTAPI CcPreparePinWrite (IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Zero, IN ULONG Flags, OUT PVOID *Bcb, OUT PVOID *Buffer)
 
VOID NTAPI CcSetDirtyPinnedData (IN PVOID Bcb, IN PLARGE_INTEGER Lsn)
 
VOID NTAPI CcUnpinData (IN PVOID Bcb)
 
VOID NTAPI CcUnpinDataForThread (IN PVOID Bcb, IN ERESOURCE_THREAD ResourceThreadId)
 
VOID NTAPI CcRepinBcb (IN PVOID Bcb)
 
VOID NTAPI CcUnpinRepinnedBcb (IN PVOID Bcb, IN BOOLEAN WriteThrough, IN PIO_STATUS_BLOCK IoStatus)
 

Variables

NPAGED_LOOKASIDE_LIST iBcbLookasideList
 
ULONG CcMapDataWait = 0
 
ULONG CcMapDataNoWait = 0
 
ULONG CcPinReadWait = 0
 
ULONG CcPinReadNoWait = 0
 
ULONG CcPinMappedDataCount = 0
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 14 of file pin.c.

Function Documentation

◆ CcMapData()

BOOLEAN NTAPI CcMapData ( IN PFILE_OBJECT  FileObject,
IN PLARGE_INTEGER  FileOffset,
IN ULONG  Length,
IN ULONG  Flags,
OUT PVOID pBcb,
OUT PVOID pBuffer 
)

Definition at line 382 of file pin.c.

389 {
390  BOOLEAN Ret;
391  KIRQL OldIrql;
392  PINTERNAL_BCB iBcb;
393  PROS_VACB Vacb;
394  PROS_SHARED_CACHE_MAP SharedCacheMap;
395 
396  DPRINT("CcMapData(FileObject 0x%p, FileOffset %I64x, Length %lu, Flags 0x%lx,"
397  " pBcb 0x%p, pBuffer 0x%p)\n", FileObject, FileOffset->QuadPart,
398  Length, Flags, pBcb, pBuffer);
399 
401  ASSERT(FileObject->SectionObjectPointer);
402  ASSERT(FileObject->SectionObjectPointer->SharedCacheMap);
403 
404  SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap;
405  ASSERT(SharedCacheMap);
406 
407  if (Flags & MAP_WAIT)
408  {
409  ++CcMapDataWait;
410  }
411  else
412  {
413  ++CcMapDataNoWait;
414  }
415 
416  KeAcquireSpinLock(&SharedCacheMap->BcbSpinLock, &OldIrql);
417  iBcb = CcpFindBcb(SharedCacheMap, FileOffset, Length, FALSE);
418 
419  if (iBcb == NULL)
420  {
421  KeReleaseSpinLock(&SharedCacheMap->BcbSpinLock, OldIrql);
422 
423  Ret = CcpMapData(SharedCacheMap, FileOffset, Length, Flags, &Vacb, pBuffer);
424  if (Ret)
425  {
426  iBcb = CcpGetAppropriateBcb(SharedCacheMap, Vacb, FileOffset, Length, 0, FALSE);
427  if (iBcb == NULL)
428  {
429  CcRosReleaseVacb(SharedCacheMap, Vacb, TRUE, FALSE, FALSE);
430  Ret = FALSE;
431  }
432  else
433  {
434  *pBcb = iBcb;
435  }
436  }
437  }
438  else
439  {
440  ++iBcb->RefCount;
441  KeReleaseSpinLock(&SharedCacheMap->BcbSpinLock, OldIrql);
442 
443  *pBcb = iBcb;
445  Ret = TRUE;
446  }
447 
448  CCTRACE(CC_API_DEBUG, "FileObject=%p FileOffset=%p Length=%lu Flags=0x%lx -> %d Bcb=%p\n",
449  FileObject, FileOffset, Length, Flags, Ret, *pBcb);
450  return Ret;
451 }
#define TRUE
Definition: types.h:120
Definition: cc.h:201
PVOID BaseAddress
Definition: cc.h:204
unsigned char * PUCHAR
Definition: retypes.h:3
KSPIN_LOCK BcbSpinLock
Definition: cc.h:186
#define MAP_WAIT
UCHAR KIRQL
Definition: env_spec_w32.h:591
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
unsigned char BOOLEAN
ULONG CcMapDataWait
Definition: pin.c:28
smooth NULL
Definition: ftsmooth.c:416
static BOOLEAN NTAPI CcpMapData(IN PROS_SHARED_CACHE_MAP SharedCacheMap, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PROS_VACB *pVacb, OUT PVOID *pBuffer)
Definition: pin.c:73
PVOID pBuffer
void DPRINT(...)
Definition: polytest.cpp:61
_Inout_ PFILE_OBJECT FileObject
Definition: cdprocs.h:593
static PVOID CcpGetAppropriateBcb(IN PROS_SHARED_CACHE_MAP SharedCacheMap, IN PROS_VACB Vacb, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG PinFlags, IN BOOLEAN ToPin)
Definition: pin.c:194
#define CC_API_DEBUG
Definition: cc.h:11
NTSTATUS NTAPI CcRosReleaseVacb(PROS_SHARED_CACHE_MAP SharedCacheMap, PROS_VACB Vacb, BOOLEAN Valid, BOOLEAN Dirty, BOOLEAN Mapped)
Definition: view.c:421
#define KeAcquireSpinLock(sl, irql)
Definition: env_spec_w32.h:609
#define CCTRACE(x, fmt,...)
Definition: cc.h:36
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
ULONG CcMapDataNoWait
Definition: pin.c:29
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:803
static PINTERNAL_BCB NTAPI CcpFindBcb(IN PROS_SHARED_CACHE_MAP SharedCacheMap, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Pinned)
Definition: pin.c:39
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:151
#define KeReleaseSpinLock(sl, irql)
Definition: env_spec_w32.h:627
#define VACB_MAPPING_GRANULARITY
CSHORT RefCount
Definition: cc.h:236
PROS_VACB Vacb
Definition: cc.h:234

◆ CcpDereferenceBcb()

static VOID CcpDereferenceBcb ( IN PROS_SHARED_CACHE_MAP  SharedCacheMap,
IN PINTERNAL_BCB  Bcb 
)
static

Definition at line 157 of file pin.c.

160 {
161  ULONG RefCount;
162  KIRQL OldIrql;
163 
164  KeAcquireSpinLock(&SharedCacheMap->BcbSpinLock, &OldIrql);
165  RefCount = --Bcb->RefCount;
166  if (RefCount == 0)
167  {
168  RemoveEntryList(&Bcb->BcbEntry);
169  KeReleaseSpinLock(&SharedCacheMap->BcbSpinLock, OldIrql);
170 
171  ASSERT(Bcb->PinCount == 0);
172  /*
173  * Don't mark dirty, if it was dirty,
174  * the VACB was already marked as such
175  * following the call to CcSetDirtyPinnedData
176  */
177  CcRosReleaseVacb(SharedCacheMap,
178  Bcb->Vacb,
179  TRUE,
180  FALSE,
181  FALSE);
182 
183  ExDeleteResourceLite(&Bcb->Lock);
184  ExFreeToNPagedLookasideList(&iBcbLookasideList, Bcb);
185  }
186  else
187  {
188  KeReleaseSpinLock(&SharedCacheMap->BcbSpinLock, OldIrql);
189  }
190 }
#define TRUE
Definition: types.h:120
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
Definition: fatprocs.h:402
NTSTATUS NTAPI ExDeleteResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1456
FORCEINLINE BOOLEAN RemoveEntryList(_In_ PLIST_ENTRY Entry)
Definition: rtlfuncs.h:105
UCHAR KIRQL
Definition: env_spec_w32.h:591
NTSTATUS NTAPI CcRosReleaseVacb(PROS_SHARED_CACHE_MAP SharedCacheMap, PROS_VACB Vacb, BOOLEAN Valid, BOOLEAN Dirty, BOOLEAN Mapped)
Definition: view.c:421
#define KeAcquireSpinLock(sl, irql)
Definition: env_spec_w32.h:609
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:803
NPAGED_LOOKASIDE_LIST iBcbLookasideList
Definition: view.c:48
#define KeReleaseSpinLock(sl, irql)
Definition: env_spec_w32.h:627
unsigned int ULONG
Definition: retypes.h:1

Referenced by CcpGetAppropriateBcb(), CcpPinData(), and CcUnpinDataForThread().

◆ CcpFindBcb()

static PINTERNAL_BCB NTAPI CcpFindBcb ( IN PROS_SHARED_CACHE_MAP  SharedCacheMap,
IN PLARGE_INTEGER  FileOffset,
IN ULONG  Length,
IN BOOLEAN  Pinned 
)
static

Definition at line 39 of file pin.c.

44 {
47  PLIST_ENTRY NextEntry;
48 
49  for (NextEntry = SharedCacheMap->BcbList.Flink;
50  NextEntry != &SharedCacheMap->BcbList;
51  NextEntry = NextEntry->Flink)
52  {
53  Bcb = CONTAINING_RECORD(NextEntry, INTERNAL_BCB, BcbEntry);
54 
55  if (Bcb->PFCB.MappedFileOffset.QuadPart <= FileOffset->QuadPart &&
56  (Bcb->PFCB.MappedFileOffset.QuadPart + Bcb->PFCB.MappedLength) >=
57  (FileOffset->QuadPart + Length))
58  {
59  if ((Pinned && Bcb->PinCount > 0) || (!Pinned && Bcb->PinCount == 0))
60  {
61  Found = TRUE;
62  break;
63  }
64  }
65  }
66 
67  return (Found ? Bcb : NULL);
68 }
#define TRUE
Definition: types.h:120
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
Definition: fatprocs.h:402
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
return Found
Definition: dirsup.c:1270
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
struct _LIST_ENTRY * Flink
Definition: typedefs.h:119
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
Definition: typedefs.h:117
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:151

Referenced by CcMapData(), CcpGetAppropriateBcb(), and CcpPinData().

◆ CcpGetAppropriateBcb()

static PVOID CcpGetAppropriateBcb ( IN PROS_SHARED_CACHE_MAP  SharedCacheMap,
IN PROS_VACB  Vacb,
IN PLARGE_INTEGER  FileOffset,
IN ULONG  Length,
IN ULONG  PinFlags,
IN BOOLEAN  ToPin 
)
static

Definition at line 194 of file pin.c.

201 {
202  KIRQL OldIrql;
203  BOOLEAN Result;
204  PINTERNAL_BCB iBcb, DupBcb;
205 
206  iBcb = ExAllocateFromNPagedLookasideList(&iBcbLookasideList);
207  if (iBcb == NULL)
208  {
209  CcRosReleaseVacb(SharedCacheMap, Vacb, TRUE, FALSE, FALSE);
210  return NULL;
211  }
212 
213  RtlZeroMemory(iBcb, sizeof(*iBcb));
214  iBcb->PFCB.NodeTypeCode = 0xDE45; /* Undocumented (CAPTIVE_PUBLIC_BCB_NODETYPECODE) */
215  iBcb->PFCB.NodeByteSize = sizeof(PUBLIC_BCB);
216  iBcb->PFCB.MappedLength = Length;
217  iBcb->PFCB.MappedFileOffset = *FileOffset;
218  iBcb->Vacb = Vacb;
219  iBcb->PinCount = 0;
220  iBcb->RefCount = 1;
222 
223  KeAcquireSpinLock(&SharedCacheMap->BcbSpinLock, &OldIrql);
224 
225  /* Check if we raced with another BCB creation */
226  DupBcb = CcpFindBcb(SharedCacheMap, FileOffset, Length, ToPin);
227  /* Yes, and we've lost */
228  if (DupBcb != NULL)
229  {
230  /* We will return that BCB */
231  ++DupBcb->RefCount;
232  Result = TRUE;
233  KeReleaseSpinLock(&SharedCacheMap->BcbSpinLock, OldIrql);
234 
235  if (ToPin)
236  {
237  if (BooleanFlagOn(PinFlags, PIN_EXCLUSIVE))
238  {
240  }
241  else
242  {
244  }
245 
246  if (Result)
247  {
248  DupBcb->PinCount++;
249  }
250  else
251  {
252  CcpDereferenceBcb(SharedCacheMap, DupBcb);
253  DupBcb = NULL;
254  }
255  }
256 
257  if (DupBcb != NULL)
258  {
259  /* Delete the loser */
260  CcRosReleaseVacb(SharedCacheMap, Vacb, TRUE, FALSE, FALSE);
261  ExDeleteResourceLite(&iBcb->Lock);
262  ExFreeToNPagedLookasideList(&iBcbLookasideList, iBcb);
263  }
264 
265  /* Return the winner - no need to update buffer address, it's
266  * relative to the VACB, which is unchanged.
267  */
268  iBcb = DupBcb;
269  }
270  /* Nope, insert ourselves */
271  else
272  {
273  if (ToPin)
274  {
275  iBcb->PinCount++;
276 
277  if (BooleanFlagOn(PinFlags, PIN_EXCLUSIVE))
278  {
280  }
281  else
282  {
284  }
285 
286  ASSERT(Result);
287  }
288 
289  InsertTailList(&SharedCacheMap->BcbList, &iBcb->BcbEntry);
290  KeReleaseSpinLock(&SharedCacheMap->BcbSpinLock, OldIrql);
291  }
292 
293  return iBcb;
294 }
LIST_ENTRY BcbEntry
Definition: cc.h:237
#define TRUE
Definition: types.h:120
#define BooleanFlagOn(F, SF)
Definition: ext2fs.h:183
NTSTATUS ExInitializeResourceLite(PULONG res)
Definition: env_spec_w32.h:641
NTSTATUS NTAPI ExDeleteResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1456
#define PIN_WAIT
#define InsertTailList(ListHead, Entry)
PUBLIC_BCB
Definition: cctypes.h:12
BOOLEAN NTAPI ExAcquireResourceExclusiveLite(IN PERESOURCE Resource, IN BOOLEAN Wait)
Definition: resource.c:770
UCHAR KIRQL
Definition: env_spec_w32.h:591
PUBLIC_BCB PFCB
Definition: cc.h:233
ULONG PinCount
Definition: cc.h:235
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
_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
NTSTATUS NTAPI CcRosReleaseVacb(PROS_SHARED_CACHE_MAP SharedCacheMap, PROS_VACB Vacb, BOOLEAN Valid, BOOLEAN Dirty, BOOLEAN Mapped)
Definition: view.c:421
#define KeAcquireSpinLock(sl, irql)
Definition: env_spec_w32.h:609
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:803
static PINTERNAL_BCB NTAPI CcpFindBcb(IN PROS_SHARED_CACHE_MAP SharedCacheMap, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Pinned)
Definition: pin.c:39
BOOLEAN NTAPI ExAcquireSharedStarveExclusive(IN PERESOURCE Resource, IN BOOLEAN Wait)
Definition: resource.c:1063
NPAGED_LOOKASIDE_LIST iBcbLookasideList
Definition: view.c:48
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:151
#define KeReleaseSpinLock(sl, irql)
Definition: env_spec_w32.h:627
static VOID CcpDereferenceBcb(IN PROS_SHARED_CACHE_MAP SharedCacheMap, IN PINTERNAL_BCB Bcb)
Definition: pin.c:157
#define PIN_EXCLUSIVE
ERESOURCE Lock
Definition: cc.h:232
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
CSHORT RefCount
Definition: cc.h:236
PROS_VACB Vacb
Definition: cc.h:234

Referenced by CcMapData(), and CcpPinData().

◆ CcPinMappedData()

BOOLEAN NTAPI CcPinMappedData ( IN PFILE_OBJECT  FileObject,
IN PLARGE_INTEGER  FileOffset,
IN ULONG  Length,
IN ULONG  Flags,
OUT PVOID Bcb 
)

Definition at line 458 of file pin.c.

464 {
465  BOOLEAN Result;
466  PVOID Buffer;
467  PINTERNAL_BCB iBcb;
468  PROS_SHARED_CACHE_MAP SharedCacheMap;
469 
470  CCTRACE(CC_API_DEBUG, "FileObject=%p FileOffset=%p Length=%lu Flags=0x%lx\n",
472 
474  ASSERT(FileObject->SectionObjectPointer);
475  ASSERT(FileObject->SectionObjectPointer->SharedCacheMap);
476 
477  SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap;
478  ASSERT(SharedCacheMap);
479  if (!SharedCacheMap->PinAccess)
480  {
481  DPRINT1("FIXME: Pinning a file with no pin access!\n");
482  return FALSE;
483  }
484 
485  iBcb = *Bcb;
486 
488 
489  Result = CcpPinData(SharedCacheMap, FileOffset, Length, Flags, Bcb, &Buffer);
490  if (Result)
491  {
492  CcUnpinData(iBcb);
493  }
494 
495  return Result;
496 }
BOOLEAN PinAccess
Definition: cc.h:191
static BOOLEAN CcpPinData(IN PROS_SHARED_CACHE_MAP SharedCacheMap, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PVOID *Bcb, OUT PVOID *Buffer)
Definition: pin.c:298
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
Definition: fatprocs.h:402
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
unsigned char BOOLEAN
_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
Definition: bufpool.h:45
_Inout_ PFILE_OBJECT FileObject
Definition: cdprocs.h:593
#define CC_API_DEBUG
Definition: cc.h:11
VOID NTAPI CcUnpinData(IN PVOID Bcb)
Definition: pin.c:592
#define CCTRACE(x, fmt,...)
Definition: cc.h:36
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
ULONG CcPinMappedDataCount
Definition: pin.c:32
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:151
#define DPRINT1
Definition: precomp.h:8
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34

◆ CcPinRead()

BOOLEAN NTAPI CcPinRead ( IN PFILE_OBJECT  FileObject,
IN PLARGE_INTEGER  FileOffset,
IN ULONG  Length,
IN ULONG  Flags,
OUT PVOID Bcb,
OUT PVOID Buffer 
)

Definition at line 503 of file pin.c.

510 {
511  PROS_SHARED_CACHE_MAP SharedCacheMap;
512 
513  CCTRACE(CC_API_DEBUG, "FileOffset=%p FileOffset=%p Length=%lu Flags=0x%lx\n",
515 
517  ASSERT(FileObject->SectionObjectPointer);
518  ASSERT(FileObject->SectionObjectPointer->SharedCacheMap);
519 
520  SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap;
521  ASSERT(SharedCacheMap);
522  if (!SharedCacheMap->PinAccess)
523  {
524  DPRINT1("FIXME: Pinning a file with no pin access!\n");
525  return FALSE;
526  }
527 
528  if (Flags & PIN_WAIT)
529  {
530  ++CcPinReadWait;
531  }
532  else
533  {
534  ++CcPinReadNoWait;
535  }
536 
537  return CcpPinData(SharedCacheMap, FileOffset, Length, Flags, Bcb, Buffer);
538 }
BOOLEAN PinAccess
Definition: cc.h:191
static BOOLEAN CcpPinData(IN PROS_SHARED_CACHE_MAP SharedCacheMap, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PVOID *Bcb, OUT PVOID *Buffer)
Definition: pin.c:298
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
Definition: fatprocs.h:402
#define PIN_WAIT
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
Definition: bufpool.h:45
_Inout_ PFILE_OBJECT FileObject
Definition: cdprocs.h:593
#define CC_API_DEBUG
Definition: cc.h:11
ULONG CcPinReadNoWait
Definition: pin.c:31
#define CCTRACE(x, fmt,...)
Definition: cc.h:36
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:151
ULONG CcPinReadWait
Definition: pin.c:30
#define DPRINT1
Definition: precomp.h:8

Referenced by CcPreparePinWrite().

◆ CcpMapData()

static BOOLEAN NTAPI CcpMapData ( IN PROS_SHARED_CACHE_MAP  SharedCacheMap,
IN PLARGE_INTEGER  FileOffset,
IN ULONG  Length,
IN ULONG  Flags,
OUT PROS_VACB pVacb,
OUT PVOID pBuffer 
)
static

Definition at line 73 of file pin.c.

80 {
81  LONGLONG ReadOffset, BaseOffset;
82  BOOLEAN Valid;
83  PROS_VACB Vacb;
85  LONGLONG ROffset;
86 
87  ReadOffset = FileOffset->QuadPart;
88 
89  DPRINT("SectionSize %I64x, FileSize %I64x\n",
90  SharedCacheMap->SectionSize.QuadPart,
91  SharedCacheMap->FileSize.QuadPart);
92 
94  {
95  CCTRACE(CC_API_DEBUG, "FileObject=%p FileOffset=%p Length=%lu Flags=0x%lx -> FALSE\n",
96  SharedCacheMap->FileObject, FileOffset, Length, Flags);
97  return FALSE;
98  }
99 
101  {
102  static int Warned = 0;
103 
105  if (!Warned)
106  {
107  DPRINT1("Mapping/pinning with no read not implemented. Forcing read, might fail if wait not allowed\n");
108  Warned++;
109  }
110  }
111 
112  /* Properly round offset and call internal helper for getting a VACB */
113  ROffset = ROUND_DOWN(ReadOffset, VACB_MAPPING_GRANULARITY);
114  Status = CcRosGetVacb(SharedCacheMap,
115  ROffset,
116  &BaseOffset,
117  pBuffer,
118  &Valid,
119  &Vacb);
120  if (!NT_SUCCESS(Status))
121  {
122  CCTRACE(CC_API_DEBUG, "FileObject=%p FileOffset=%p Length=%lu Flags=0x%lx -> FALSE\n",
123  SharedCacheMap->FileObject, FileOffset, Length, Flags);
125  return FALSE;
126  }
127 
128  if (!Valid && BooleanFlagOn(Flags, MAP_NO_READ))
129  {
131  {
132  CcRosReleaseVacb(SharedCacheMap, Vacb, FALSE, FALSE, FALSE);
133  CCTRACE(CC_API_DEBUG, "FileObject=%p FileOffset=%p Length=%lu Flags=0x%lx -> FALSE\n",
134  SharedCacheMap->FileObject, FileOffset, Length, Flags);
135  return FALSE;
136  }
137 
139  if (!NT_SUCCESS(Status))
140  {
141  CcRosReleaseVacb(SharedCacheMap, Vacb, FALSE, FALSE, FALSE);
142  CCTRACE(CC_API_DEBUG, "FileObject=%p FileOffset=%p Length=%lu Flags=0x%lx -> FALSE\n",
143  SharedCacheMap->FileObject, FileOffset, Length, Flags);
145  return FALSE;
146  }
147  }
148 
149  *pBuffer = (PUCHAR)*pBuffer + ReadOffset % VACB_MAPPING_GRANULARITY;
150  *pVacb = Vacb;
151 
152  return TRUE;
153 }
#define TRUE
Definition: types.h:120
Definition: cc.h:201
#define BooleanFlagOn(F, SF)
Definition: ext2fs.h:183
unsigned char * PUCHAR
Definition: retypes.h:3
LONG NTSTATUS
Definition: precomp.h:26
#define ExRaiseStatus
Definition: ntoskrnl.h:96
#define MAP_WAIT
NTSTATUS NTAPI CcRosGetVacb(PROS_SHARED_CACHE_MAP SharedCacheMap, LONGLONG FileOffset, PLONGLONG BaseOffset, PVOID *BaseAddress, PBOOLEAN UptoDate, PROS_VACB *Vacb)
Definition: view.c:937
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
unsigned char BOOLEAN
PVOID pBuffer
void DPRINT(...)
Definition: polytest.cpp:61
int64_t LONGLONG
Definition: typedefs.h:66
#define CC_API_DEBUG
Definition: cc.h:11
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
NTSTATUS NTAPI CcRosReleaseVacb(PROS_SHARED_CACHE_MAP SharedCacheMap, PROS_VACB Vacb, BOOLEAN Valid, BOOLEAN Dirty, BOOLEAN Mapped)
Definition: view.c:421
#define CCTRACE(x, fmt,...)
Definition: cc.h:36
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
Status
Definition: gdiplustypes.h:24
#define ROUND_DOWN(n, align)
Definition: eventvwr.h:30
#define SetFlag(_F, _SF)
Definition: ext2fs.h:187
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:151
#define MAP_NO_READ
#define DPRINT1
Definition: precomp.h:8
#define VACB_MAPPING_GRANULARITY
NTSTATUS NTAPI CcReadVirtualAddress(PROS_VACB Vacb)
Definition: copy.c:81

Referenced by CcMapData(), and CcpPinData().

◆ CcpPinData()

static BOOLEAN CcpPinData ( IN PROS_SHARED_CACHE_MAP  SharedCacheMap,
IN PLARGE_INTEGER  FileOffset,
IN ULONG  Length,
IN ULONG  Flags,
OUT PVOID Bcb,
OUT PVOID Buffer 
)
static

Definition at line 298 of file pin.c.

305 {
306  PINTERNAL_BCB NewBcb;
307  BOOLEAN Result;
308  PROS_VACB Vacb;
309  KIRQL OldIrql;
310  ULONG MapFlags;
311 
312  KeAcquireSpinLock(&SharedCacheMap->BcbSpinLock, &OldIrql);
313  NewBcb = CcpFindBcb(SharedCacheMap, FileOffset, Length, TRUE);
314 
315  if (NewBcb != NULL)
316  {
317  ++NewBcb->RefCount;
318  KeReleaseSpinLock(&SharedCacheMap->BcbSpinLock, OldIrql);
319 
321  {
323  }
324  else
325  {
327  }
328 
329  if (!Result)
330  {
331  CcpDereferenceBcb(SharedCacheMap, NewBcb);
332  NewBcb = NULL;
333  }
334  else
335  {
336  NewBcb->PinCount++;
337  *Bcb = NewBcb;
339  }
340 
341  return Result;
342  }
343  else
344  {
345  KeReleaseSpinLock(&SharedCacheMap->BcbSpinLock, OldIrql);
346 
348  {
349  return FALSE;
350  }
351 
352  MapFlags = Flags & PIN_WAIT;
354  {
355  SetFlag(MapFlags, MAP_NO_READ);
356  }
357 
358  Result = CcpMapData(SharedCacheMap, FileOffset, Length, MapFlags, &Vacb, Buffer);
359  if (Result)
360  {
361  NewBcb = CcpGetAppropriateBcb(SharedCacheMap, Vacb, FileOffset, Length, Flags, TRUE);
362  if (NewBcb == NULL)
363  {
364  CcRosReleaseVacb(SharedCacheMap, Vacb, TRUE, FALSE, FALSE);
365  Result = FALSE;
366  }
367  else
368  {
369  *Bcb = NewBcb;
370  }
371  }
372  }
373 
374  return Result;
375 }
#define TRUE
Definition: types.h:120
Definition: cc.h:201
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
Definition: fatprocs.h:402
PVOID BaseAddress
Definition: cc.h:204
#define BooleanFlagOn(F, SF)
Definition: ext2fs.h:183
unsigned char * PUCHAR
Definition: retypes.h:3
#define PIN_WAIT
BOOLEAN NTAPI ExAcquireResourceExclusiveLite(IN PERESOURCE Resource, IN BOOLEAN Wait)
Definition: resource.c:770
UCHAR KIRQL
Definition: env_spec_w32.h:591
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
ULONG PinCount
Definition: cc.h:235
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
static BOOLEAN NTAPI CcpMapData(IN PROS_SHARED_CACHE_MAP SharedCacheMap, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PROS_VACB *pVacb, OUT PVOID *pBuffer)
Definition: pin.c:73
_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
Definition: bufpool.h:45
static PVOID CcpGetAppropriateBcb(IN PROS_SHARED_CACHE_MAP SharedCacheMap, IN PROS_VACB Vacb, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG PinFlags, IN BOOLEAN ToPin)
Definition: pin.c:194
NTSTATUS NTAPI CcRosReleaseVacb(PROS_SHARED_CACHE_MAP SharedCacheMap, PROS_VACB Vacb, BOOLEAN Valid, BOOLEAN Dirty, BOOLEAN Mapped)
Definition: view.c:421
#define KeAcquireSpinLock(sl, irql)
Definition: env_spec_w32.h:609
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:803
static PINTERNAL_BCB NTAPI CcpFindBcb(IN PROS_SHARED_CACHE_MAP SharedCacheMap, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Pinned)
Definition: pin.c:39
BOOLEAN NTAPI ExAcquireSharedStarveExclusive(IN PERESOURCE Resource, IN BOOLEAN Wait)
Definition: resource.c:1063
#define SetFlag(_F, _SF)
Definition: ext2fs.h:187
#define PIN_IF_BCB
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:151
#define MAP_NO_READ
#define KeReleaseSpinLock(sl, irql)
Definition: env_spec_w32.h:627
static VOID CcpDereferenceBcb(IN PROS_SHARED_CACHE_MAP SharedCacheMap, IN PINTERNAL_BCB Bcb)
Definition: pin.c:157
#define PIN_EXCLUSIVE
#define VACB_MAPPING_GRANULARITY
unsigned int ULONG
Definition: retypes.h:1
ERESOURCE Lock
Definition: cc.h:232
CSHORT RefCount
Definition: cc.h:236
#define PIN_NO_READ
PROS_VACB Vacb
Definition: cc.h:234

Referenced by CcPinMappedData(), and CcPinRead().

◆ CcPreparePinWrite()

BOOLEAN NTAPI CcPreparePinWrite ( IN PFILE_OBJECT  FileObject,
IN PLARGE_INTEGER  FileOffset,
IN ULONG  Length,
IN BOOLEAN  Zero,
IN ULONG  Flags,
OUT PVOID Bcb,
OUT PVOID Buffer 
)

Definition at line 545 of file pin.c.

553 {
554  CCTRACE(CC_API_DEBUG, "FileOffset=%p FileOffset=%p Length=%lu Zero=%d Flags=0x%lx\n",
556 
557  /*
558  * FIXME: This is function is similar to CcPinRead, but doesn't
559  * read the data if they're not present. Instead it should just
560  * prepare the VACBs and zero them out if Zero != FALSE.
561  *
562  * For now calling CcPinRead is better than returning error or
563  * just having UNIMPLEMENTED here.
564  */
566 }
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
Definition: fatprocs.h:402
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
Definition: bufpool.h:45
_Inout_ PFILE_OBJECT FileObject
Definition: cdprocs.h:593
#define CC_API_DEBUG
Definition: cc.h:11
#define CCTRACE(x, fmt,...)
Definition: cc.h:36
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:151
IN PVCB IN VBO IN ULONG OUT PBCB OUT PVOID IN BOOLEAN IN BOOLEAN Zero
Definition: fatprocs.h:402
BOOLEAN NTAPI CcPinRead(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PVOID *Bcb, OUT PVOID *Buffer)
Definition: pin.c:503

◆ CcRepinBcb()

VOID NTAPI CcRepinBcb ( IN PVOID  Bcb)

Definition at line 629 of file pin.c.

631 {
632  PINTERNAL_BCB iBcb = Bcb;
633 
634  CCTRACE(CC_API_DEBUG, "Bcb=%p\n", Bcb);
635 
636  iBcb->RefCount++;
637 }
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
Definition: fatprocs.h:402
#define CC_API_DEBUG
Definition: cc.h:11
#define CCTRACE(x, fmt,...)
Definition: cc.h:36
CSHORT RefCount
Definition: cc.h:236

◆ CcSetDirtyPinnedData()

VOID NTAPI CcSetDirtyPinnedData ( IN PVOID  Bcb,
IN PLARGE_INTEGER  Lsn 
)

Definition at line 572 of file pin.c.

575 {
576  PINTERNAL_BCB iBcb = Bcb;
577 
578  CCTRACE(CC_API_DEBUG, "Bcb=%p Lsn=%p\n",
579  Bcb, Lsn);
580 
581  if (!iBcb->Vacb->Dirty)
582  {
583  CcRosMarkDirtyVacb(iBcb->Vacb);
584  }
585 }
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
Definition: fatprocs.h:402
#define CC_API_DEBUG
Definition: cc.h:11
#define CCTRACE(x, fmt,...)
Definition: cc.h:36
BOOLEAN Dirty
Definition: cc.h:210
VOID NTAPI CcRosMarkDirtyVacb(PROS_VACB Vacb)
Definition: view.c:502
PROS_VACB Vacb
Definition: cc.h:234

◆ CcUnpinData()

VOID NTAPI CcUnpinData ( IN PVOID  Bcb)

Definition at line 592 of file pin.c.

594 {
595  CCTRACE(CC_API_DEBUG, "Bcb=%p\n", Bcb);
596 
598 }
ULONG_PTR ERESOURCE_THREAD
Definition: extypes.h:208
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
Definition: fatprocs.h:402
VOID NTAPI CcUnpinDataForThread(IN PVOID Bcb, IN ERESOURCE_THREAD ResourceThreadId)
Definition: pin.c:605
#define PsGetCurrentThread()
Definition: env_spec_w32.h:81
#define CC_API_DEBUG
Definition: cc.h:11
#define CCTRACE(x, fmt,...)
Definition: cc.h:36

Referenced by CcPinMappedData().

◆ CcUnpinDataForThread()

VOID NTAPI CcUnpinDataForThread ( IN PVOID  Bcb,
IN ERESOURCE_THREAD  ResourceThreadId 
)

Definition at line 605 of file pin.c.

608 {
609  PINTERNAL_BCB iBcb = Bcb;
610  PROS_SHARED_CACHE_MAP SharedCacheMap;
611 
612  CCTRACE(CC_API_DEBUG, "Bcb=%p ResourceThreadId=%lu\n", Bcb, ResourceThreadId);
613 
614  if (iBcb->PinCount != 0)
615  {
617  iBcb->PinCount--;
618  }
619 
620  SharedCacheMap = iBcb->Vacb->SharedCacheMap;
621  CcpDereferenceBcb(SharedCacheMap, iBcb);
622 }
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
Definition: fatprocs.h:402
ULONG PinCount
Definition: cc.h:235
PROS_SHARED_CACHE_MAP SharedCacheMap
Definition: cc.h:225
#define CC_API_DEBUG
Definition: cc.h:11
#define CCTRACE(x, fmt,...)
Definition: cc.h:36
_In_ ERESOURCE_THREAD ResourceThreadId
Definition: exfuncs.h:844
static VOID CcpDereferenceBcb(IN PROS_SHARED_CACHE_MAP SharedCacheMap, IN PINTERNAL_BCB Bcb)
Definition: pin.c:157
ERESOURCE Lock
Definition: cc.h:232
VOID NTAPI ExReleaseResourceForThreadLite(IN PERESOURCE Resource, IN ERESOURCE_THREAD Thread)
Definition: resource.c:1844
PROS_VACB Vacb
Definition: cc.h:234

Referenced by CcUnpinData().

◆ CcUnpinRepinnedBcb()

VOID NTAPI CcUnpinRepinnedBcb ( IN PVOID  Bcb,
IN BOOLEAN  WriteThrough,
IN PIO_STATUS_BLOCK  IoStatus 
)

Definition at line 644 of file pin.c.

648 {
649  PINTERNAL_BCB iBcb = Bcb;
650  KIRQL OldIrql;
651  PROS_SHARED_CACHE_MAP SharedCacheMap;
652 
653  CCTRACE(CC_API_DEBUG, "Bcb=%p WriteThrough=%d\n", Bcb, WriteThrough);
654 
655  SharedCacheMap = iBcb->Vacb->SharedCacheMap;
656  IoStatus->Status = STATUS_SUCCESS;
657 
658  KeAcquireSpinLock(&SharedCacheMap->BcbSpinLock, &OldIrql);
659  if (--iBcb->RefCount == 0)
660  {
661  RemoveEntryList(&iBcb->BcbEntry);
662  KeReleaseSpinLock(&SharedCacheMap->BcbSpinLock, OldIrql);
663 
664  IoStatus->Information = 0;
665  if (WriteThrough)
666  {
667  if (iBcb->Vacb->Dirty)
668  {
669  IoStatus->Status = CcRosFlushVacb(iBcb->Vacb);
670  }
671  else
672  {
673  IoStatus->Status = STATUS_SUCCESS;
674  }
675  }
676  else
677  {
678  IoStatus->Status = STATUS_SUCCESS;
679  }
680 
681  if (iBcb->PinCount != 0)
682  {
683  ExReleaseResourceLite(&iBcb->Lock);
684  iBcb->PinCount--;
685  ASSERT(iBcb->PinCount == 0);
686  }
687 
688  /*
689  * Don't mark dirty, if it was dirty,
690  * the VACB was already marked as such
691  * following the call to CcSetDirtyPinnedData
692  */
694  iBcb->Vacb,
695  TRUE,
696  FALSE,
697  FALSE);
698 
699  ExDeleteResourceLite(&iBcb->Lock);
700  ExFreeToNPagedLookasideList(&iBcbLookasideList, iBcb);
701  }
702  else
703  {
704  KeReleaseSpinLock(&SharedCacheMap->BcbSpinLock, OldIrql);
705  }
706 }
LIST_ENTRY BcbEntry
Definition: cc.h:237
#define TRUE
Definition: types.h:120
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
Definition: fatprocs.h:402
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG IN BOOLEAN OUT PIO_STATUS_BLOCK IoStatus
Definition: fatprocs.h:2650
KSPIN_LOCK BcbSpinLock
Definition: cc.h:186
NTSTATUS NTAPI ExDeleteResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1456
FORCEINLINE BOOLEAN RemoveEntryList(_In_ PLIST_ENTRY Entry)
Definition: rtlfuncs.h:105
UCHAR KIRQL
Definition: env_spec_w32.h:591
ULONG PinCount
Definition: cc.h:235
PROS_SHARED_CACHE_MAP SharedCacheMap
Definition: cc.h:225
#define CC_API_DEBUG
Definition: cc.h:11
NTSTATUS NTAPI CcRosReleaseVacb(PROS_SHARED_CACHE_MAP SharedCacheMap, PROS_VACB Vacb, BOOLEAN Valid, BOOLEAN Dirty, BOOLEAN Mapped)
Definition: view.c:421
#define KeAcquireSpinLock(sl, irql)
Definition: env_spec_w32.h:609
#define CCTRACE(x, fmt,...)
Definition: cc.h:36
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1817
BOOLEAN Dirty
Definition: cc.h:210
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:803
NPAGED_LOOKASIDE_LIST iBcbLookasideList
Definition: view.c:48
#define KeReleaseSpinLock(sl, irql)
Definition: env_spec_w32.h:627
ERESOURCE Lock
Definition: cc.h:232
CSHORT RefCount
Definition: cc.h:236
NTSTATUS NTAPI CcRosFlushVacb(PROS_VACB Vacb)
Definition: view.c:165
return STATUS_SUCCESS
Definition: btrfs.c:2938
PROS_VACB Vacb
Definition: cc.h:234

Variable Documentation

◆ CcMapDataNoWait

ULONG CcMapDataNoWait = 0

Definition at line 29 of file pin.c.

Referenced by CcMapData(), and QSI_DEF().

◆ CcMapDataWait

ULONG CcMapDataWait = 0

Definition at line 28 of file pin.c.

Referenced by CcMapData(), and QSI_DEF().

◆ CcPinMappedDataCount

ULONG CcPinMappedDataCount = 0

Definition at line 32 of file pin.c.

Referenced by CcPinMappedData(), and QSI_DEF().

◆ CcPinReadNoWait

ULONG CcPinReadNoWait = 0

Definition at line 31 of file pin.c.

Referenced by CcPinRead(), and QSI_DEF().

◆ CcPinReadWait

ULONG CcPinReadWait = 0

Definition at line 30 of file pin.c.

Referenced by CcPinRead(), and QSI_DEF().

◆ iBcbLookasideList

NPAGED_LOOKASIDE_LIST iBcbLookasideList

Definition at line 48 of file view.c.

Referenced by CcInitView(), CcpDereferenceBcb(), CcpGetAppropriateBcb(), and CcUnpinRepinnedBcb().