mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
Windows: Do not permit RDR worker threads to quit
If the DeviceIoControl from the service's redirector worker threads fails the thread will terminate. This is a problem because if all of the threads quit the afs redirector will end up deadlocking all requests since there will be no method of delivering them to the service. If there is an error log it (if possible), and retry. Hopefully it will be transient. Change-Id: I3ce5e338e41fd71c5289fe778789f0300c0b5ecd Reviewed-on: http://gerrit.openafs.org/7627 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com> Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
parent
d7690835ac
commit
e513799232
@ -471,7 +471,7 @@ RDR_RequestWorkerThread( LPVOID lpParameter)
|
||||
|
||||
requestBuffer->RequestFlags = pInfo->Flags;
|
||||
|
||||
if( !RDR_DeviceIoControl( hDevHandle,
|
||||
if( RDR_DeviceIoControl( hDevHandle,
|
||||
IOCTL_AFS_PROCESS_IRP_REQUEST,
|
||||
(void *)requestBuffer,
|
||||
sizeof( AFSCommRequest),
|
||||
@ -480,21 +480,27 @@ RDR_RequestWorkerThread( LPVOID lpParameter)
|
||||
&bytesReturned ))
|
||||
{
|
||||
|
||||
WaitForSingleObject( RDR_SuspendEvent, INFINITE);
|
||||
|
||||
//
|
||||
// Error condition back from driver
|
||||
// Go process the request
|
||||
//
|
||||
|
||||
break;
|
||||
if (!Exit)
|
||||
RDR_ProcessRequest( requestBuffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
WaitForSingleObject( RDR_SuspendEvent, INFINITE);
|
||||
if (afsd_logp->enabled) {
|
||||
WCHAR wchBuffer[256];
|
||||
DWORD gle = GetLastError();
|
||||
|
||||
//
|
||||
// Go process the request
|
||||
//
|
||||
|
||||
if (!Exit)
|
||||
RDR_ProcessRequest( requestBuffer);
|
||||
swprintf( wchBuffer,
|
||||
L"Failed to post IOCTL_AFS_IRP_REQUEST gle 0x%x", gle);
|
||||
osi_Log1(afsd_logp, "%S", osi_LogSaveStringW(afsd_logp, wchBuffer));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
free( requestBuffer);
|
||||
|
Loading…
Reference in New Issue
Block a user