mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
Windows: Remove unused AFSVolumeWorkerThread
The currently implmentation does all maintenance work in the AFSPrimaryVolumeWorkerThread which is associated with the AFSGlobalRoot volume object. Remove AFSVolumeWorkerThread as it is unused. Change-Id: I2174833093b436430fc46f056e23bb272df6388f Reviewed-on: http://gerrit.openafs.org/8793 Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com> Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
parent
1726aec2b2
commit
fef0776df4
@ -389,16 +389,13 @@ AFSInitVolumeWorker( IN AFSVolumeCB *VolumeCB)
|
|||||||
__Enter
|
__Enter
|
||||||
{
|
{
|
||||||
|
|
||||||
if( VolumeCB == AFSGlobalRoot)
|
if ( VolumeCB != AFSGlobalRoot)
|
||||||
{
|
{
|
||||||
|
|
||||||
pStartRoutine = AFSPrimaryVolumeWorkerThread;
|
return STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
pStartRoutine = AFSVolumeWorkerThread;
|
pStartRoutine = AFSPrimaryVolumeWorkerThread;
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Initialize the worker thread
|
// Initialize the worker thread
|
||||||
@ -1676,102 +1673,6 @@ AFSPrimaryVolumeWorkerThread( IN PVOID Context)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
AFSVolumeWorkerThread( IN PVOID Context)
|
|
||||||
{
|
|
||||||
|
|
||||||
NTSTATUS ntStatus = STATUS_SUCCESS;
|
|
||||||
AFSVolumeCB *pVolumeCB = (AFSVolumeCB * )Context;
|
|
||||||
AFSWorkQueueContext *pPoolContext = (AFSWorkQueueContext *)&pVolumeCB->VolumeWorkerContext;
|
|
||||||
AFSDeviceExt *pControlDeviceExt = NULL;
|
|
||||||
AFSDeviceExt *pRDRDeviceExt = NULL;
|
|
||||||
LARGE_INTEGER DueTime;
|
|
||||||
LONG TimeOut;
|
|
||||||
KTIMER Timer;
|
|
||||||
LONG lCount;
|
|
||||||
|
|
||||||
pControlDeviceExt = (AFSDeviceExt *)AFSControlDeviceObject->DeviceExtension;
|
|
||||||
|
|
||||||
pRDRDeviceExt = (AFSDeviceExt *)AFSRDRDeviceObject->DeviceExtension;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Initialize the timer for the worker thread
|
|
||||||
//
|
|
||||||
|
|
||||||
DueTime.QuadPart = -(5000);
|
|
||||||
|
|
||||||
TimeOut = 5000;
|
|
||||||
|
|
||||||
KeInitializeTimerEx( &Timer,
|
|
||||||
SynchronizationTimer);
|
|
||||||
|
|
||||||
KeSetTimerEx( &Timer,
|
|
||||||
DueTime,
|
|
||||||
TimeOut,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Indicate that we are initialized and ready
|
|
||||||
//
|
|
||||||
|
|
||||||
KeSetEvent( &pPoolContext->WorkerThreadReady,
|
|
||||||
0,
|
|
||||||
FALSE);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Indicate we are initialized
|
|
||||||
//
|
|
||||||
|
|
||||||
SetFlag( pPoolContext->State, AFS_WORKER_INITIALIZED);
|
|
||||||
|
|
||||||
while( BooleanFlagOn( pPoolContext->State, AFS_WORKER_PROCESS_REQUESTS))
|
|
||||||
{
|
|
||||||
|
|
||||||
ntStatus = KeWaitForSingleObject( &Timer,
|
|
||||||
Executive,
|
|
||||||
KernelMode,
|
|
||||||
FALSE,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
if( !NT_SUCCESS( ntStatus))
|
|
||||||
{
|
|
||||||
|
|
||||||
AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
|
|
||||||
AFS_TRACE_LEVEL_ERROR,
|
|
||||||
"AFSVolumeWorkerThread Wait for queue items failed Status %08lX\n", ntStatus);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
//
|
|
||||||
// If we are in shutdown mode and the dirty flag is clear then get out now
|
|
||||||
//
|
|
||||||
|
|
||||||
if( BooleanFlagOn( pRDRDeviceExt->DeviceFlags, AFS_DEVICE_FLAG_REDIRECTOR_SHUTDOWN))
|
|
||||||
{
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} // worker thread loop
|
|
||||||
|
|
||||||
KeCancelTimer( &Timer);
|
|
||||||
|
|
||||||
lCount = InterlockedDecrement( &pControlDeviceExt->Specific.Control.VolumeWorkerThreadCount);
|
|
||||||
|
|
||||||
if( lCount == 0)
|
|
||||||
{
|
|
||||||
|
|
||||||
KeSetEvent( &pControlDeviceExt->Specific.Control.VolumeWorkerCloseEvent,
|
|
||||||
0,
|
|
||||||
FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
PsTerminateSystemThread( 0);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
AFSInsertWorkitem( IN AFSWorkItem *WorkItem)
|
AFSInsertWorkitem( IN AFSWorkItem *WorkItem)
|
||||||
{
|
{
|
||||||
|
@ -1463,9 +1463,6 @@ AFSIOWorkerThread( IN PVOID Context);
|
|||||||
void
|
void
|
||||||
AFSPrimaryVolumeWorkerThread( IN PVOID Context);
|
AFSPrimaryVolumeWorkerThread( IN PVOID Context);
|
||||||
|
|
||||||
void
|
|
||||||
AFSVolumeWorkerThread( IN PVOID Context);
|
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
AFSInsertWorkitem( IN AFSWorkItem *WorkItem);
|
AFSInsertWorkitem( IN AFSWorkItem *WorkItem);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user