mirror of
https://git.openafs.org/openafs.git
synced 2025-01-21 00:10:15 +00:00
Windows: Directory validation should purge data changes immediately
During AFSEnumerateDirectory() and AFSVerifyDirectoryContent() calls use AFSPerformObjectInvalidate() instead of AFSInvalidateObject() to trigger the data purge. This is necessary to avoid a race as AFSInvalidateObject() will queue a work request that will be performed after the metadata is updated. Change-Id: Iaf09c6448927a037175cb4a83502fd4a1d210ef2 Reviewed-on: http://gerrit.openafs.org/7279 Tested-by: BuildBot <buildbot@rampaginggeek.com> Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com> Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
This commit is contained in:
parent
76f2e07fd0
commit
d4c9cbc75e
@ -643,6 +643,10 @@ AFSCleanup( IN PDEVICE_OBJECT LibDeviceObject,
|
||||
|
||||
if( BooleanFlagOn( pFcb->Flags, AFS_FCB_FLAG_PURGE_ON_CLOSE))
|
||||
{
|
||||
//
|
||||
// The ObjectReferenceCount will be freed by AFSPerformObjectInvalidate
|
||||
//
|
||||
|
||||
InterlockedIncrement( &pObjectInfo->ObjectReferenceCount);
|
||||
|
||||
ClearFlag( pFcb->Flags, AFS_FCB_FLAG_PURGE_ON_CLOSE);
|
||||
|
@ -306,16 +306,14 @@ AFSEnumerateDirectory( IN GUID *AuthGroup,
|
||||
LONG lCount;
|
||||
AFSObjectInfoCB *pObjectInfo = pDirNode->ObjectInformation;
|
||||
|
||||
//
|
||||
// The ObjectReferenceCount will be freed by AFSPerformObjectInvalidate
|
||||
//
|
||||
|
||||
lCount = InterlockedIncrement( &pObjectInfo->ObjectReferenceCount);
|
||||
|
||||
AFSInvalidateObject( &pObjectInfo,
|
||||
AFS_INVALIDATE_DATA_VERSION);
|
||||
|
||||
if( pObjectInfo != NULL)
|
||||
{
|
||||
|
||||
lCount = InterlockedDecrement( &pObjectInfo->ObjectReferenceCount);
|
||||
}
|
||||
AFSPerformObjectInvalidate( pObjectInfo,
|
||||
AFS_INVALIDATE_DATA_VERSION);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1070,16 +1068,14 @@ AFSVerifyDirectoryContent( IN AFSObjectInfoCB *ObjectInfoCB,
|
||||
if( pObjectInfo->DataVersion.QuadPart != pCurrentDirEntry->DataVersion.QuadPart)
|
||||
{
|
||||
|
||||
//
|
||||
// The ObjectReferenceCount will be freed by AFSPerformObjectInvalidate
|
||||
//
|
||||
|
||||
lCount = InterlockedIncrement( &pObjectInfo->ObjectReferenceCount);
|
||||
|
||||
AFSInvalidateObject( &pObjectInfo,
|
||||
AFS_INVALIDATE_DATA_VERSION);
|
||||
|
||||
if( pObjectInfo != NULL)
|
||||
{
|
||||
|
||||
lCount = InterlockedDecrement( &pObjectInfo->ObjectReferenceCount);
|
||||
}
|
||||
AFSPerformObjectInvalidate( pObjectInfo,
|
||||
AFS_INVALIDATE_DATA_VERSION);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user