Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 1001 of file fastio.c.
Referenced by Ext2FsdInitializeFunctionPointers().
{ BOOLEAN ReturnedStatus = TRUE; PtrExt2FCB PtrFCB = NULL; PtrExt2CCB PtrCCB = NULL; PtrExt2NTRequiredFCB PtrReqdFCB = NULL; // The context is whatever we passed to the Cache Manager when invoking // the CcInitializeCacheMaps() function. In the case of the sample FSD // implementation, this context is a pointer to the CCB structure. ASSERT(Context); PtrCCB = (PtrExt2CCB)(Context); ASSERT(PtrCCB->NodeIdentifier.NodeType == EXT2_NODE_TYPE_CCB); DebugTrace(DEBUG_TRACE_IRP_ENTRY,"~~~[FastIO call]~~~ Ext2AcqReadAhead", 0); if( PtrCCB && PtrCCB->PtrFileObject ) { DebugTrace(DEBUG_TRACE_FILE_OBJ, "###### File Pointer 0x%LX [FastIO]", PtrCCB->PtrFileObject ); } PtrFCB = PtrCCB->PtrFCB; ASSERT(PtrFCB); AssertFCB( PtrFCB ); /* if( PtrFCB->NodeIdentifier.NodeType != EXT2_NODE_TYPE_FCB ) { // Ext2BreakPoint(); DebugTrace(DEBUG_TRACE_ERROR, "~~~[FastIO call]~~~ Invalid FCB...", 0); return TRUE; } */ PtrReqdFCB = &(PtrFCB->NTRequiredFCB); // Acquire the MainResource in the FCB shared. // Note: The read-ahead thread typically always supplies WAIT set to TRUE. DebugTrace(DEBUG_TRACE_MISC,"*** Attempting to acquire FCB Shared [FastIo]", 0); DebugTraceState( "FCBMain AC:0x%LX SW:0x%LX EX:0x%LX [FastIo]", PtrReqdFCB->MainResource.ActiveCount, PtrReqdFCB->MainResource.NumberOfExclusiveWaiters, PtrReqdFCB->MainResource.NumberOfSharedWaiters ); if (!ExAcquireResourceSharedLite(&(PtrReqdFCB->MainResource), Wait)) { DebugTrace(DEBUG_TRACE_MISC,"*** Attempt to acquire FCB FAILED [FastIo]", 0); ReturnedStatus = FALSE; } else { DebugTrace(DEBUG_TRACE_MISC,"*** FCB acquired [FastIo]", 0); } // If your FSD needs to perform some special preparations in anticipation // of receving a read-ahead request, do so now. return ReturnedStatus; }