sys: cached read/write testing

This commit is contained in:
Bill Zissimopoulos
2016-03-11 14:44:17 -08:00
parent 3f98d1cb01
commit 151247f1e6
8 changed files with 97 additions and 43 deletions

View File

@ -174,7 +174,10 @@ BOOLEAN FspAcquireForLazyWrite(
ASSERT(0 == IoGetTopLevelIrp());
Result = FspFileNodeTryAcquireExclusiveF(FileNode, FspFileNodeAcquireFull, Wait);
if (Result)
{
FileNode->LazyWriteThread = PsGetCurrentThread();
IoSetTopLevelIrp((PIRP)FSRTL_CACHE_TOP_LEVEL_IRP);
}
FSP_LEAVE_BOOL("Context=%p, Wait=%d", Context, Wait);
}
@ -192,6 +195,7 @@ VOID FspReleaseFromLazyWrite(
ASSERT((PIRP)FSRTL_CACHE_TOP_LEVEL_IRP == IoGetTopLevelIrp());
IoSetTopLevelIrp(0);
FileNode->LazyWriteThread = 0;
FspFileNodeRelease(FileNode, Full);
FSP_LEAVE_VOID("Context=%p", Context);