IN ULONG BytesToWrite,
IN BOOLEAN Retrying)
{
+ KIRQL OldIrql;
PDEFERRED_WRITE Context;
PFSRTL_COMMON_FCB_HEADER Fcb;
/* Try to execute the posted writes */
CcPostDeferredWrites();
- /* FIXME: lock master */
+ /* Schedule a lazy writer run to handle deferred writes */
+ OldIrql = KeAcquireQueuedSpinLock(LockQueueMasterLock);
if (!LazyWriter.ScanActive)
{
CcScheduleLazyWriteScan(FALSE);
}
+ KeReleaseQueuedSpinLock(LockQueueMasterLock, OldIrql);
}
/*
CcPostWorkQueue(WorkItem, &CcRegularWorkQueue);
}
-/* FIXME: handle master lock */
VOID
CcLazyWriteScan(VOID)
{
CcPostDeferredWrites();
}
+ /* Post items that were due for end of run */
while (!IsListEmpty(&ToPost))
{
ListEntry = RemoveHeadList(&ToPost);
}
/* We're no longer active */
+ OldIrql = KeAcquireQueuedSpinLock(LockQueueMasterLock);
LazyWriter.ScanActive = FALSE;
+ KeReleaseQueuedSpinLock(LockQueueMasterLock, OldIrql);
}
VOID CcScheduleLazyWriteScan(
KeReleaseSpinLock(&SharedCacheMap->CacheMapLock, oldIrql);
KeReleaseGuardedMutex(&ViewLock);
- /* FIXME: lock master */
+ /* Schedule a lazy writer run to now that we have dirty VACB */
+ oldIrql = KeAcquireQueuedSpinLock(LockQueueMasterLock);
if (!LazyWriter.ScanActive)
{
CcScheduleLazyWriteScan(FALSE);
}
+ KeReleaseQueuedSpinLock(LockQueueMasterLock, oldIrql);
}
VOID